/* ============================================================================
   Mercantil PTWC™ — Financial Intelligence OS
   Design language: Apple HIG · Linear · Fireblocks · Mercury · Stripe
   v2.0 — minimal, flat, spacious, dark-mode native
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;450;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand */
  --m-ink:        #111827;   /* institutional graphite (secondary) */
  --m-primary:    #DC2626;   /* primary brand red */
  --m-primary-d:  #B91C1C;
  --m-accent:     #EF4444;   /* red accent */

  /* Surfaces */
  --m-bg:         #F8FAFC;
  --m-surface:    #FFFFFF;
  --m-raised:     #FFFFFF;
  --m-line:       #E2E8F0;
  --m-line-2:     #EDF1F6;
  --m-hover:      #F1F5F9;

  /* Text */
  --m-text:       #0F172A;
  --m-text-2:     #64748B;
  --m-text-3:     #94A3B8;

  /* Status — reserved for risk / compliance only */
  --m-success:    #16A34A;
  --m-warning:    #F59E0B;
  --m-danger:     #DC2626;
  --m-critical:   #991B1B;

  --m-tint:       rgba(220,38,38,.08);

  --r-sm: 8px;  --r: 12px;  --r-lg: 16px;  --r-xl: 22px;
  --sh:    0 1px 2px rgba(17,17,17,.04);
  --sh-md: 0 2px 8px rgba(17,17,17,.05), 0 1px 2px rgba(17,17,17,.04);
  --sh-pop:0 12px 32px rgba(17,17,17,.12), 0 2px 8px rgba(17,17,17,.06);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --font-num: 'IBM Plex Sans', 'Inter', sans-serif;

  --sidebar-w: 256px;
  --sidebar-w-collapsed: 76px;
  --header-h: 64px;
}

* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--m-bg);
  color: var(--m-text);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
h1,h2,h3,h4,h5 { font-family: var(--font); letter-spacing: -0.025em; font-weight: 600; }
.font-monospace, .ptwc-num { font-family: var(--font-num); font-feature-settings: 'tnum' 1; }
a { color: var(--m-primary); text-decoration: none; }

/* ============================================================================
   APP SHELL — sidebar + main
   ============================================================================ */
.ptwc-app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns .22s cubic-bezier(.2,.7,.2,1); }
.ptwc-app.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

/* ---- Sidebar ---- */
.ptwc-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--m-surface); border-right: 1px solid var(--m-line);
  padding: 18px 14px; gap: 4px; overflow: hidden;
}
.ptwc-side-brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 6px; margin-bottom: 18px; }
.ptwc-side-brand .logo-full { height: 26px; width: auto; display: block; }
.ptwc-side-brand .logo-mark { height: 26px; width: auto; display: none; }
.ptwc-app.collapsed .logo-full { display: none; }
.ptwc-app.collapsed .logo-mark { display: block; }
.ptwc-side-brand .badge-ptwc { margin-left: auto; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; color: var(--m-primary); background: var(--m-tint); padding: 3px 7px; border-radius: 6px; }
.ptwc-app.collapsed .badge-ptwc { display: none; }

.ptwc-side-group { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--m-text-3); padding: 14px 10px 6px; }
.ptwc-app.collapsed .ptwc-side-group { opacity: 0; height: 14px; padding-top: 14px; }

.ptwc-side-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--m-text-2); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: .14s; position: relative;
}
.ptwc-side-link svg { width: 18px; height: 18px; flex: none; stroke-width: 1.9; }
.ptwc-side-link span { transition: opacity .15s; }
.ptwc-app.collapsed .ptwc-side-link span { opacity: 0; pointer-events: none; }
.ptwc-app.collapsed .ptwc-side-link { justify-content: center; padding: 9px; }
.ptwc-side-link:hover { background: var(--m-hover); color: var(--m-text); }
.ptwc-side-link.active { background: var(--m-tint); color: var(--m-primary); font-weight: 600; }
.ptwc-side-link.active svg { stroke-width: 2.2; }

.ptwc-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--m-line-2); }
.ptwc-side-btn {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--m-text-2); font-weight: 500; font-size: 13px; background: transparent; border: 0; cursor: pointer; width: 100%; text-align: left; transition: .14s; white-space: nowrap;
}
.ptwc-side-btn svg { width: 18px; height: 18px; flex: none; }
.ptwc-side-btn:hover { background: var(--m-hover); color: var(--m-text); }
.ptwc-app.collapsed .ptwc-side-btn span { opacity: 0; pointer-events: none; }
.ptwc-app.collapsed .ptwc-side-btn { justify-content: center; padding: 9px; }

/* ---- Main column ---- */
.ptwc-main { display: flex; flex-direction: column; min-width: 0; }
.ptwc-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(250,250,250,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--m-line);
}
.ptwc-search-wrap { position: relative; flex: 1; max-width: 460px; }
.ptwc-search-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--m-text-3); width: 16px; height: 16px; }
.ptwc-search {
  width: 100%; height: 38px; border: 1px solid var(--m-line); background: var(--m-surface);
  border-radius: 10px; padding: 0 12px 0 38px; font-size: 13px; color: var(--m-text); transition: .15s;
}
.ptwc-search::placeholder { color: var(--m-text-3); }
.ptwc-search:focus { outline: none; border-color: var(--m-text-3); box-shadow: 0 0 0 4px rgba(17,17,17,.04); }
.ptwc-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--m-text-3); border: 1px solid var(--m-line); border-radius: 5px; padding: 1px 6px; background: var(--m-surface); }

.ptwc-header-spacer { flex: 1; }
.ptwc-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--m-text-2); display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; transition: .14s;
}
.ptwc-icon-btn:hover { background: var(--m-hover); color: var(--m-text); }
.ptwc-icon-btn .ptwc-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--m-primary); border: 2px solid var(--m-bg); }

.ptwc-lang { display: inline-flex; border: 1px solid var(--m-line); border-radius: 9px; overflow: hidden; background: var(--m-surface); }
.ptwc-lang a { padding: 6px 9px; color: var(--m-text-2); font-size: 11.5px; font-weight: 600; transition: .14s; }
.ptwc-lang a.active { background: var(--m-ink); color: #fff; }
.ptwc-lang a:hover:not(.active) { background: var(--m-hover); color: var(--m-text); }

.ptwc-profile { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--m-line); }
.ptwc-avatar { width: 34px; height: 34px; border-radius: 9px; background: var(--m-ink); color: #fff; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ptwc-profile-name { color: var(--m-text); font-size: 13px; font-weight: 600; line-height: 1.15; }
.ptwc-profile-role { color: var(--m-text-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }

.ptwc-content { padding: 30px 28px 56px; max-width: 1360px; width: 100%; margin: 0 auto; }

/* quick-action button in header */
.ptwc-quick { display: inline-flex; align-items: center; gap: 7px; }

/* ============================================================================
   TYPOGRAPHY / PAGE HEADER
   ============================================================================ */
.ptwc-page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.ptwc-micro-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--m-text-3); }
.ptwc-page-title { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; color: var(--m-text); margin: 4px 0 0; line-height: 1.1; }
.ptwc-page-sub { color: var(--m-text-2); font-size: 14.5px; margin-top: 5px; }
.ptwc-page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ============================================================================
   CARDS / SECTIONS — flat, soft, floating
   ============================================================================ */
.ptwc-card, .card { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-lg); box-shadow: var(--sh); }
.ptwc-card-pad, .card-body { padding: 20px; }
.ptwc-section { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden; }
.ptwc-section > .ptwc-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 14px; }
.ptwc-section-title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--m-text); }
.ptwc-section-sub { font-size: 12px; color: var(--m-text-3); margin-top: 1px; }
.ptwc-section-body { padding: 0 20px 20px; }
.card-header { background: transparent; border: 0; font-weight: 600; color: var(--m-text); font-size: 14px; padding: 16px 20px 0; }
.ptwc-card:hover { box-shadow: var(--sh-md); }
.ptwc-card, .ptwc-section { transition: box-shadow .2s, border-color .2s; }

/* ============================================================================
   KPI — minimalist, identical, no floating icons, no colored cards
   ============================================================================ */
.ptwc-stat { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 0; }
.ptwc-stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ptwc-stat-label { color: var(--m-text-2); font-size: 12px; font-weight: 500; letter-spacing: -0.005em; }
.ptwc-stat-value { font-family: var(--font-num); font-weight: 600; font-size: 38px; line-height: 1.05; color: var(--m-text); margin-top: 10px; letter-spacing: -0.03em; }
.ptwc-stat-affix { font-family: var(--font-num); font-size: 16px; color: var(--m-text-3); font-weight: 500; margin-right: 4px; }
.ptwc-stat-num { font-family: var(--font-num); font-weight: 600; }
.ptwc-stat-hint { color: var(--m-text-3); font-size: 11.5px; margin-top: 3px; }
/* delta chip — semantic via text color only */
.ptwc-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; font-family: var(--font-num); }
.ptwc-delta svg { width: 13px; height: 13px; }
.ptwc-delta.up { color: var(--m-success); }
.ptwc-delta.down { color: var(--m-danger); }
.ptwc-delta.flat { color: var(--m-text-3); }
.ptwc-spark { height: 38px; margin-top: 14px; }
.ptwc-spark canvas { width: 100%; height: 38px; display: block; }

/* legacy mini-bar (kept for top-lists) */
.ptwc-mini-bar { height: 6px; border-radius: 6px; background: var(--m-line-2); overflow: hidden; }
.ptwc-mini-bar > span { display: block; height: 100%; border-radius: 6px; background: var(--m-primary); }

/* chart wrapper */
.ptwc-chart-wrap { position: relative; height: 260px; padding: 4px 0 0; }
.ptwc-chart-wrap.sm { height: 200px; }

/* ============================================================================
   RISK INTELLIGENCE module
   ============================================================================ */
.ptwc-risk-score { display: flex; align-items: baseline; gap: 10px; }
.ptwc-risk-score .num { font-family: var(--font-num); font-weight: 600; font-size: 56px; letter-spacing: -0.04em; line-height: 1; color: var(--m-text); }
.ptwc-risk-score .max { color: var(--m-text-3); font-size: 16px; font-weight: 500; }
.ptwc-risk-band { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.ptwc-risk-track { height: 8px; border-radius: 999px; background: var(--m-line-2); overflow: hidden; margin: 14px 0 4px; }
.ptwc-risk-track > span { display: block; height: 100%; border-radius: 999px; }
.ptwc-factor-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--m-line-2); }
.ptwc-factor-row:first-of-type { border-top: 0; }
.ptwc-factor-name { flex: 1; font-size: 13px; color: var(--m-text); }
.ptwc-factor-bar { width: 120px; height: 6px; border-radius: 6px; background: var(--m-line-2); overflow: hidden; position: relative; }
.ptwc-factor-bar > span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 6px; background: var(--m-primary); }
.ptwc-factor-pts { width: 44px; text-align: right; font-family: var(--font-num); font-weight: 600; font-size: 13px; color: var(--m-text); }

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn { border-radius: 10px; font-weight: 500; font-size: 13px; padding: 9px 15px; letter-spacing: -0.01em; transition: .15s; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 7px; }
.btn svg { width: 15px; height: 15px; }
.ptwc-btn-primary, .btn.ptwc-btn-primary, .btn-primary { background: var(--m-primary); color: #fff; border-color: var(--m-primary); }
.ptwc-btn-primary:hover, .btn-primary:hover { background: var(--m-primary-d); color: #fff; }
.ptwc-btn-dark, .btn-dark { background: var(--m-ink); color: #fff; border-color: var(--m-ink); }
.ptwc-btn-dark:hover { background: #000; color: #fff; }
.btn-outline-primary, .ptwc-btn-ghost { background: var(--m-surface); color: var(--m-text); border-color: var(--m-line); }
.btn-outline-primary:hover, .ptwc-btn-ghost:hover { background: var(--m-hover); border-color: var(--m-text-3); color: var(--m-text); }
.btn-outline-secondary { color: var(--m-text-2); border-color: var(--m-line); background: var(--m-surface); }
.btn-danger { background: var(--m-danger); border-color: var(--m-danger); color: #fff; }
.btn-success { background: var(--m-success); border-color: var(--m-success); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 14px; border-radius: 12px; }
.ptwc-action-btn { display: inline-flex; align-items: center; gap: 7px; }

/* ============================================================================
   TABLES — Notion / Linear
   ============================================================================ */
.table { color: var(--m-text); margin: 0; }
.table > thead th { background: transparent; color: var(--m-text-3); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--m-line); padding: 10px 14px; }
.table > tbody td { padding: 13px 14px; border-color: var(--m-line-2); vertical-align: middle; font-size: 13.5px; }
.table-hover > tbody > tr { transition: background .12s; }
.table-hover > tbody > tr:hover { background: var(--m-hover); }
.table .font-monospace { font-size: 12.5px; color: var(--m-text-2); }

/* ============================================================================
   BADGES / RATING PILLS — minimal
   ============================================================================ */
.badge { font-weight: 500; font-size: 11.5px; letter-spacing: 0; padding: 4px 9px; border-radius: 7px; }
.bg-success { background: rgba(22,163,74,.10) !important; color: #15803d !important; }
.bg-info    { background: rgba(122,122,122,.10) !important; color: var(--m-text-2) !important; }
.bg-warning { background: rgba(217,119,6,.12) !important; color: #b45309 !important; }
.bg-danger  { background: rgba(220,38,38,.10) !important; color: var(--m-danger) !important; }
.bg-secondary { background: var(--m-line-2) !important; color: var(--m-text-2) !important; }
.bg-light   { background: var(--m-line-2) !important; color: var(--m-text-2) !important; }
.bg-dark    { background: var(--m-ink) !important; color: #fff !important; }
.bg-orange  { background: rgba(217,119,6,.12) !important; color: #b45309 !important; }

.ptwc-rating { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; }
.ptwc-rating::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.r-low      { background: rgba(22,163,74,.10);  color: #15803d; } .r-low::before { background: var(--m-success); }
.r-medium   { background: rgba(122,122,122,.10); color: var(--m-text-2); } .r-medium::before { background: var(--m-text-3); }
.r-elevated { background: rgba(217,119,6,.12);  color: #b45309; } .r-elevated::before { background: var(--m-warning); }
.r-high     { background: rgba(220,38,38,.10);  color: var(--m-danger); } .r-high::before { background: var(--m-danger); }
.r-critical { background: rgba(154,16,24,.12);  color: var(--m-critical); } .r-critical::before { background: var(--m-critical); }

/* ============================================================================
   FORMS
   ============================================================================ */
.form-control, .form-select { border: 1px solid var(--m-line); border-radius: 10px; font-size: 13.5px; padding: 10px 12px; color: var(--m-text); background: var(--m-surface); transition: .15s; }
.form-control:focus, .form-select:focus { border-color: var(--m-text-3); box-shadow: 0 0 0 4px rgba(17,17,17,.04); outline: none; }
.form-label { font-weight: 500; font-size: 12.5px; color: var(--m-text); margin-bottom: 6px; }
.form-text { color: var(--m-text-3); font-size: 11.5px; }
.ptwc-input-icon { position: relative; }
.ptwc-input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--m-text-3); }
.ptwc-input-icon .form-control { padding-left: 36px; }

/* segmented pills */
.ptwc-pills { display: inline-flex; background: var(--m-line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.ptwc-pills > a, .ptwc-pills > button { border: 0; background: transparent; color: var(--m-text-2); font-size: 12.5px; font-weight: 500; padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: .14s; }
.ptwc-pills > a.active, .ptwc-pills > button.active { background: var(--m-surface); color: var(--m-text); box-shadow: var(--sh); }
.ptwc-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--m-line-2); color: var(--m-text-2); font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }

/* ============================================================================
   ALERTS
   ============================================================================ */
.alert { border-radius: var(--r); border: 1px solid transparent; font-size: 13.5px; padding: 13px 16px; }
.alert-success { background: rgba(22,163,74,.06); border-color: rgba(22,163,74,.20); color: #15803d; }
.alert-danger  { background: rgba(220,38,38,.05); border-color: rgba(220,38,38,.18); color: #b91c1c; }
.alert-warning { background: rgba(217,119,6,.06); border-color: rgba(217,119,6,.20); color: #b45309; }

/* ============================================================================
   EMPTY STATE / SKELETON / TOAST / DIVIDER
   ============================================================================ */
.ptwc-empty { text-align: center; padding: 36px 18px; color: var(--m-text-2); }
.ptwc-empty-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--m-line-2); color: var(--m-text-3); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.ptwc-empty-msg { font-weight: 600; color: var(--m-text); font-size: 14px; }
.ptwc-empty-sub { font-size: 12.5px; margin-top: 3px; }
.ptwc-skeleton { background: linear-gradient(90deg, var(--m-line-2) 25%, #f4f4f5 50%, var(--m-line-2) 75%); background-size: 200% 100%; animation: ptwcSkel 1.3s infinite; border-radius: 6px; }
@keyframes ptwcSkel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ptwc-divider { height: 1px; background: var(--m-line); margin: 18px 0; }
.text-muted { color: var(--m-text-2) !important; }

.ptwc-toast-host { position: fixed; right: 22px; bottom: 22px; z-index: 1080; display: flex; flex-direction: column; gap: 10px; }
.ptwc-toast { background: var(--m-ink); color: #fff; border-radius: 11px; padding: 12px 16px; font-size: 13px; font-weight: 500; box-shadow: var(--sh-pop); min-width: 240px; animation: ptwcToastIn .28s ease; }
.ptwc-toast.t-success { box-shadow: var(--sh-pop), inset 3px 0 0 var(--m-success); }
.ptwc-toast.t-danger { box-shadow: var(--sh-pop), inset 3px 0 0 var(--m-accent); }
.ptwc-toast-out { opacity: 0; transform: translateX(12px); transition: .35s; }
@keyframes ptwcToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================================
   EXECUTIVE CASE COMPONENTS (cases/show) — restyled to v2
   ============================================================================ */
.ptwc-case-hero { background: var(--m-ink); border-radius: var(--r-lg); color: #fff; padding: 24px 26px; }
.ptwc-case-hero .ptwc-case-no { font-weight: 600; font-size: 24px; letter-spacing: -0.02em; }
.ptwc-hero-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 5px 12px; font-size: 11.5px; font-weight: 500; }
.ptwc-hero-pill.danger { background: var(--m-accent); border-color: transparent; color: #fff; }
.ptwc-stat-tile { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); border-radius: 12px; padding: 12px 14px; }
.ptwc-stat-tile .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.6); }
.ptwc-stat-tile .val { font-family: var(--font-num); font-weight: 600; font-size: 15px; color: #fff; margin-top: 2px; word-break: break-all; }
.ptwc-kv { width: 100%; font-size: 13.5px; }
.ptwc-kv tr { border-bottom: 1px solid var(--m-line-2); }
.ptwc-kv th { color: var(--m-text-2); font-weight: 500; padding: 10px 0; width: 44%; vertical-align: top; }
.ptwc-kv td { padding: 10px 0; text-align: right; font-weight: 500; }
.ptwc-memo-box { font-family: var(--font-num); font-size: 12.5px; line-height: 1.7; background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 12px; padding: 16px 18px; white-space: pre-wrap; color: var(--m-text); }
.ptwc-escalation { border: 1px solid rgba(220,38,38,.25); border-radius: var(--r-lg); overflow: hidden; }
.ptwc-escalation-head { background: var(--m-critical); color: #fff; padding: 16px 20px; }

/* legacy gauge (cases/show) — neutralized to ring in red */
.ptwc-gauge { position: relative; width: 168px; height: 168px; }
.ptwc-gauge svg { transform: rotate(-90deg); display: block; }
.ptwc-gauge .ptwc-gauge-track { fill: none; stroke: var(--m-line); stroke-width: 12; }
.ptwc-gauge .ptwc-gauge-fill { fill: none; stroke-width: 12; stroke-linecap: round; animation: ptwcGauge 1.4s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes ptwcGauge { from { stroke-dashoffset: var(--circ); } to { stroke-dashoffset: var(--target); } }
.ptwc-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ptwc-gauge-score { font-family: var(--font-num); font-weight: 600; font-size: 44px; color: var(--m-text); line-height: 1; }
.ptwc-gauge-max { color: var(--m-text-3); font-size: 12px; font-weight: 500; }

/* ============================================================================
   AUTH / LOGIN — minimal split, Mercantil red brand panel
   ============================================================================ */
.ptwc-auth { margin: 0; background: var(--m-bg); }
.ptwc-auth-grid { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.ptwc-auth-brand { position: relative; padding: 52px 56px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: var(--m-ink); overflow: hidden; }
.ptwc-auth-brand::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(620px 420px at 85% -10%, rgba(215,25,32,.40), transparent 60%); }
.ptwc-auth-brand > * { position: relative; z-index: 1; }
.ptwc-auth-logo { height: 30px; width: auto; }
.ptwc-auth-headline { font-weight: 600; font-size: 40px; line-height: 1.08; letter-spacing: -0.03em; margin: 16px 0 18px; }
.ptwc-auth-headline span { color: var(--m-accent); }
.ptwc-auth-lede { color: rgba(255,255,255,.65); font-size: 15px; line-height: 1.6; max-width: 440px; }
.ptwc-auth-trust { display: flex; flex-direction: column; gap: 11px; margin-top: 30px; }
.ptwc-auth-trust span { position: relative; padding-left: 24px; color: rgba(255,255,255,.82); font-size: 13px; font-weight: 500; }
.ptwc-auth-trust span::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 7px; height: 7px; border-radius: 50%; background: var(--m-accent); box-shadow: 0 0 0 4px rgba(255,77,79,.16); }
.ptwc-auth-brand-bot { color: rgba(255,255,255,.45); font-size: 12px; line-height: 1.7; }
.ptwc-auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--m-surface); }
.ptwc-auth-form { width: 100%; max-width: 380px; }
.ptwc-auth-mark { display: none; }
.ptwc-auth-title { font-weight: 600; font-size: 26px; color: var(--m-text); margin: 0; letter-spacing: -0.02em; }
.ptwc-auth-subtitle { color: var(--m-text-2); font-size: 13.5px; margin: 5px 0 26px; }
.ptwc-auth-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--m-line-2); color: var(--m-text-2); font-size: 12px; display: flex; align-items: center; gap: 7px; }
@media (max-width: 860px) {
  .ptwc-auth-grid { grid-template-columns: 1fr; }
  .ptwc-auth-brand { display: none; }
  .ptwc-auth-form-wrap { min-height: 100vh; }
  .ptwc-auth-mark { display: block; text-align: center; margin-bottom: 18px; }
  .ptwc-auth-mark img { height: 30px; }
}

/* public client shell */
.ptwc-public-bg { background: var(--m-ink); min-height: 100vh; }
.ptwc-public-bg::before { content: ''; position: fixed; inset: 0; background: radial-gradient(700px 460px at 80% -10%, rgba(215,25,32,.35), transparent 60%); pointer-events: none; }
.ptwc-brand-mark { width: 56px; height: 56px; border-radius: 15px; background: var(--m-primary); color: #fff; font-size: 1.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ptwc-check-circle { width: 72px; height: 72px; border-radius: 50%; background: rgba(22,163,74,.12); color: var(--m-success); font-size: 2rem; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(22,163,74,.3); }

/* ============================================================================
   DARK MODE — native
   ============================================================================ */
[data-theme="dark"] {
  --m-bg: #111111;
  --m-surface: #1A1A1A;
  --m-raised: #232323;
  --m-line: #2A2A2A;
  --m-line-2: #232323;
  --m-hover: #232323;
  --m-text: #F5F5F5;
  --m-text-2: #9A9A9A;
  --m-text-3: #6E6E6E;
  --m-primary: #FF4D4F;
  --m-primary-d: #E23B3D;
  --m-accent: #FF4D4F;
  --m-tint: rgba(255,77,79,.12);
  --m-ink: #1A1A1A;
}
[data-theme="dark"] body { background: var(--m-bg); color: var(--m-text); }
[data-theme="dark"] .ptwc-header { background: rgba(17,17,17,.72); }
[data-theme="dark"] .ptwc-avatar { background: var(--m-raised); color: #fff; }
[data-theme="dark"] .ptwc-lang a.active { background: var(--m-primary); color: #fff; }
[data-theme="dark"] .ptwc-case-hero { background: #000; }
[data-theme="dark"] .ptwc-search { background: var(--m-raised); }
[data-theme="dark"] .ptwc-side-link.active { color: var(--m-primary); }
[data-theme="dark"] .logo-full, [data-theme="dark"] .logo-mark { filter: brightness(0) invert(1); }

/* responsive: collapse sidebar on small screens */
@media (max-width: 900px) {
  .ptwc-app, .ptwc-app.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
  .ptwc-app .logo-full { display: none; } .ptwc-app .logo-mark { display: block; }
  .ptwc-app .ptwc-side-link span, .ptwc-app .ptwc-side-btn span, .ptwc-app .ptwc-side-group { opacity: 0; }
  .ptwc-content { padding: 22px 16px 48px; }
  .ptwc-page-title { font-size: 27px; }
}
hr { border-color: var(--m-line); opacity: 1; }
.shadow-sm { box-shadow: var(--sh) !important; }

/* ============================================================================
   v3 — Financial Crime Intelligence Center blocks
   ============================================================================ */

/* Global Compliance Overview — Bloomberg-terminal KPI strip */
.ptwc-overview { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-lg); box-shadow: var(--sh); display: grid; grid-template-columns: repeat(6, 1fr); overflow: hidden; }
.ptwc-ov-cell { padding: 20px 22px; border-right: 1px solid var(--m-line-2); border-bottom: 1px solid var(--m-line-2); }
.ptwc-ov-cell:nth-child(6n) { border-right: 0; }
.ptwc-ov-label { font-size: 11.5px; font-weight: 500; color: var(--m-text-2); letter-spacing: .005em; display: flex; align-items: center; gap: 7px; }
.ptwc-ov-label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--m-primary); }
.ptwc-ov-label .dot.ok { background: var(--m-success); } .ptwc-ov-label .dot.warn { background: var(--m-warning); } .ptwc-ov-label .dot.crit { background: var(--m-danger); } .ptwc-ov-label .dot.muted { background: var(--m-text-3); }
.ptwc-ov-value { font-family: var(--font-num); font-weight: 600; font-size: 40px; letter-spacing: -0.035em; color: var(--m-text); line-height: 1.05; margin-top: 12px; }
.ptwc-ov-value .affix { font-size: 17px; color: var(--m-text-3); font-weight: 500; margin-right: 4px; }
.ptwc-ov-meta { font-size: 11.5px; color: var(--m-text-3); margin-top: 6px; }
@media (max-width: 1100px) { .ptwc-overview { grid-template-columns: repeat(3, 1fr); } .ptwc-ov-cell:nth-child(6n) { border-right: 1px solid var(--m-line-2); } .ptwc-ov-cell:nth-child(3n) { border-right: 0; } }
@media (max-width: 640px) { .ptwc-overview { grid-template-columns: repeat(2, 1fr); } .ptwc-ov-value { font-size: 30px; } }

/* Executive Reporting grid */
.ptwc-exec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--m-line-2); border-radius: var(--r); overflow: hidden; }
.ptwc-exec-cell { background: var(--m-surface); padding: 16px 18px; }
.ptwc-exec-val { font-family: var(--font-num); font-weight: 600; font-size: 26px; color: var(--m-text); letter-spacing: -0.03em; }
.ptwc-exec-val.na { color: var(--m-text-3); font-size: 20px; }
.ptwc-exec-lab { font-size: 12px; color: var(--m-text-2); margin-top: 4px; }
.ptwc-exec-na { font-size: 10.5px; color: var(--m-text-3); margin-top: 2px; font-style: italic; }
@media (max-width: 820px) { .ptwc-exec-grid { grid-template-columns: repeat(2, 1fr); } }

/* Live Compliance Activity feed */
.ptwc-feed { display: flex; flex-direction: column; }
.ptwc-feed-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--m-line-2); }
.ptwc-feed-row:first-child { border-top: 0; }
.ptwc-feed-ico { width: 30px; height: 30px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--m-hover); color: var(--m-text-2); }
.ptwc-feed-ico svg { width: 15px; height: 15px; }
.ptwc-feed-ico.crit { background: rgba(220,38,38,.10); color: var(--m-danger); }
.ptwc-feed-ico.ok { background: rgba(22,163,74,.10); color: var(--m-success); }
.ptwc-feed-ico.warn { background: rgba(245,158,11,.12); color: #b45309; }
.ptwc-feed-main { flex: 1; min-width: 0; }
.ptwc-feed-act { font-size: 13px; font-weight: 500; color: var(--m-text); }
.ptwc-feed-sub { font-size: 11.5px; color: var(--m-text-3); margin-top: 1px; }
.ptwc-feed-time { font-size: 11.5px; color: var(--m-text-3); white-space: nowrap; font-family: var(--font-num); }
.ptwc-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--m-success); }
.ptwc-live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--m-success); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: ptwcPulse 1.8s infinite; }
@keyframes ptwcPulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 6px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

/* Risk Intelligence source rows */
.ptwc-intel-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--m-line-2); }
.ptwc-intel-row:first-child { border-top: 0; }
.ptwc-intel-name { flex: 1; font-size: 13px; color: var(--m-text); font-weight: 500; }
.ptwc-intel-count { font-family: var(--font-num); font-weight: 600; font-size: 14px; color: var(--m-text); }
.ptwc-intel-tag { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(22,163,74,.10); color: #15803d; }
.ptwc-intel-tag.hits { background: rgba(220,38,38,.10); color: var(--m-danger); }

/* Risk Score Distribution */
.ptwc-dist-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.ptwc-dist-name { width: 86px; font-size: 12.5px; color: var(--m-text); display: flex; align-items: center; gap: 8px; }
.ptwc-dist-name .dot { width: 9px; height: 9px; border-radius: 50%; }
.ptwc-dist-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--m-line-2); overflow: hidden; }
.ptwc-dist-bar > span { display: block; height: 100%; border-radius: 999px; }
.ptwc-dist-val { width: 42px; text-align: right; font-family: var(--font-num); font-weight: 600; font-size: 13px; color: var(--m-text); }

/* Global Footprint map */
.ptwc-map-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: center; }
.ptwc-map svg { width: 100%; height: auto; display: block; }
.ptwc-map .region { fill: var(--m-line); stroke: var(--m-surface); stroke-width: 1.2; transition: fill .2s; }
.ptwc-map .region.a1 { fill: #FCA5A5; } .ptwc-map .region.a2 { fill: #F87171; } .ptwc-map .region.a3 { fill: #EF4444; } .ptwc-map .region.a4 { fill: #DC2626; } .ptwc-map .region.a5 { fill: #991B1B; }
.ptwc-map .region:hover { fill: var(--m-ink); }
.ptwc-map-legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--m-text-3); margin-top: 8px; }
.ptwc-map-legend .sw { width: 14px; height: 8px; border-radius: 3px; }
.ptwc-juris-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--m-line-2); }
.ptwc-juris-row:first-child { border-top: 0; }
.ptwc-juris-flag { width: 26px; font-family: var(--font-num); font-weight: 700; font-size: 11px; color: var(--m-text-2); }
.ptwc-juris-name { flex: 1; font-size: 13px; color: var(--m-text); }
.ptwc-juris-meta { font-size: 11.5px; color: var(--m-text-3); font-family: var(--font-num); }
@media (max-width: 820px) { .ptwc-map-wrap { grid-template-columns: 1fr; } }

[data-theme="dark"] .ptwc-map .region { fill: #2A2A2A; stroke: var(--m-surface); }
[data-theme="dark"] .ptwc-feed-ico { background: var(--m-raised); }
[data-theme="dark"] .ptwc-overview, [data-theme="dark"] .ptwc-exec-cell { background: var(--m-surface); }

/* ============================================================================
   Financial Crime Intelligence Graph™
   ============================================================================ */
.ptwc-content:has(.ptwc-graph-shell) { max-width: none; padding: 0; }
.ptwc-graph-shell { position: relative; display: flex; flex-direction: column; height: calc(100vh - var(--header-h)); background: var(--m-bg); }

.ptwc-graph-toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 20px; background: var(--m-surface); border-bottom: 1px solid var(--m-line); }
.ptwc-graph-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--m-text); margin-top: 2px; }
.ptwc-graph-stats { display: flex; gap: 16px; font-size: 12px; color: var(--m-text-2); border-left: 1px solid var(--m-line); padding-left: 16px; }
.ptwc-graph-stats b { color: var(--m-text); font-family: var(--font-num); font-weight: 600; }
.ptwc-graph-search { position: relative; flex: 1; min-width: 220px; max-width: 440px; }
.ptwc-graph-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--m-text-3); }
.ptwc-graph-search input { width: 100%; height: 40px; border: 1px solid var(--m-line); border-radius: 10px; background: var(--m-bg); padding: 0 12px 0 38px; font-size: 13px; color: var(--m-text); }
.ptwc-graph-search input:focus { outline: none; border-color: var(--m-primary); box-shadow: 0 0 0 4px var(--m-tint); }

.ptwc-graph-stage { position: relative; flex: 1; overflow: hidden; }
#ptwcGraph { width: 100%; height: 100%; display: block; cursor: default; }

.rk { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.rk-low { background: #16A34A; } .rk-medium { background: #EAB308; } .rk-elevated { background: #FB923C; }
.rk-high { background: #F97316; } .rk-critical { background: #DC2626; } .rk-sanctioned { background: #7F1D1D; } .rk-neutral { background: #94A3B8; }

.ptwc-graph-legend { position: absolute; left: 16px; top: 14px; background: var(--m-surface); border: 1px solid var(--m-line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--sh-md); display: flex; flex-direction: column; gap: 7px; }
.ptwc-graph-legend .ttl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--m-text-3); }
.ptwc-graph-legend .lg { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--m-text-2); }

.ptwc-graph-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 11.5px; color: var(--m-text-3); background: var(--m-surface); border: 1px solid var(--m-line); border-radius: 999px; padding: 6px 14px; box-shadow: var(--sh); pointer-events: none; }

.ptwc-graph-clusters { position: absolute; left: 16px; bottom: 50px; width: 340px; max-height: 52%; background: var(--m-surface); border: 1px solid var(--m-line); border-radius: 14px; box-shadow: var(--sh-pop); display: flex; flex-direction: column; overflow: hidden; }
.ptwc-graph-clusters .hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--m-line-2); font-size: 12px; font-weight: 600; color: var(--m-text); }
.ptwc-cl-toggle { border: 0; background: transparent; color: var(--m-text-3); font-size: 18px; line-height: 1; cursor: pointer; width: 22px; }
.ptwc-graph-clusters .bd { overflow-y: auto; padding: 6px; }
.ptwc-cl { padding: 10px 11px; border-radius: 10px; cursor: pointer; transition: background .14s; }
.ptwc-cl:hover { background: var(--m-hover); }
.ptwc-cl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.ptwc-cl-size { font-size: 11px; color: var(--m-text-3); font-family: var(--font-num); }
.ptwc-cl-narr { font-size: 12px; line-height: 1.5; color: var(--m-text-2); }

.ptwc-graph-panel { position: absolute; right: 0; top: 0; bottom: 0; width: 348px; background: var(--m-surface); border-left: 1px solid var(--m-line); box-shadow: -8px 0 28px rgba(15,23,42,.08); transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.7,.2,1); overflow-y: auto; }
.ptwc-graph-panel.open { transform: none; }
.ep-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 18px 12px; }
.ep-type { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; background: var(--m-line-2); color: var(--m-text-2); }
.ep-type.t-low { background: rgba(22,163,74,.12); color: #15803d; } .ep-type.t-medium { background: rgba(234,179,8,.14); color: #a16207; }
.ep-type.t-elevated, .ep-type.t-high { background: rgba(249,115,22,.14); color: #c2410c; }
.ep-type.t-critical { background: rgba(220,38,38,.12); color: var(--m-danger); } .ep-type.t-sanctioned { background: rgba(127,29,29,.14); color: #7f1d1d; }
.ep-head h3 { font-size: 18px; font-weight: 600; margin: 8px 0 0; word-break: break-word; }
.ep-scorewrap { padding: 0 18px 14px; }
.ep-score { font-family: var(--font-num); font-weight: 600; font-size: 40px; letter-spacing: -0.03em; line-height: 1; }
.ep-scorelbl { font-size: 11px; color: var(--m-text-3); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.ep-track { height: 8px; border-radius: 999px; background: var(--m-line-2); overflow: hidden; margin-top: 10px; }
.ep-track > span { display: block; height: 100%; border-radius: 999px; }
.ep-section { padding: 14px 18px; border-top: 1px solid var(--m-line-2); }
.ep-sec-ttl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--m-text-3); margin-bottom: 10px; }
.ep-kv { width: 100%; font-size: 13px; }
.ep-kv th { text-align: left; font-weight: 500; color: var(--m-text-2); padding: 5px 0; vertical-align: top; width: 42%; }
.ep-kv td { text-align: right; padding: 5px 0; color: var(--m-text); word-break: break-word; }
.ep-factor { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ep-factor .fl { flex: 1; font-size: 12.5px; color: var(--m-text); }
.ep-factor .fb { width: 90px; height: 6px; border-radius: 999px; background: var(--m-line-2); overflow: hidden; }
.ep-factor .fb > span { display: block; height: 100%; background: var(--m-primary); border-radius: 999px; }
.ep-factor .fp { width: 38px; text-align: right; font-family: var(--font-num); font-weight: 600; font-size: 12.5px; color: var(--m-primary); }
.ep-timeline { display: flex; flex-direction: column; }
.ep-tl { display: flex; gap: 10px; padding: 5px 0; }
.ep-tl .d { width: 9px; height: 9px; border-radius: 50%; background: var(--m-primary); margin-top: 4px; flex: none; box-shadow: 0 0 0 3px var(--m-tint); }
.ep-tl .e { font-size: 12.5px; font-weight: 500; color: var(--m-text); }
.ep-tl .t { font-size: 11px; color: var(--m-text-3); font-family: var(--font-num); }
.ep-rel { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 7px 8px; cursor: pointer; transition: background .12s; }
.ep-rel:hover { background: var(--m-hover); }
.ep-rel .rt { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--m-text-3); width: 74px; flex: none; }
.ep-rel .rl { font-size: 12.5px; color: var(--m-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-foot { padding: 0 18px 20px; }

@media (max-width: 720px) {
  .ptwc-graph-clusters { display: none; }
  .ptwc-graph-panel { width: 100%; }
}

/* ============================================================================
   Commercial marketing site (.mk)
   ============================================================================ */
body.mk { background: #fff; color: var(--m-text); }
.mk-wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.mk-eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--m-primary); margin-bottom: 14px; }

.mk-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--m-line); }
.mk-nav .mk-wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.mk-brand { display: flex; align-items: center; gap: 10px; }
.mk-brand img { height: 22px; }
.mk-brand-badge { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--m-primary); background: var(--m-tint); padding: 3px 7px; border-radius: 6px; }
.mk-links { display: flex; align-items: center; gap: 22px; }
.mk-links a { color: var(--m-text-2); font-size: 14px; font-weight: 500; }
.mk-links a:hover { color: var(--m-text); }
.mk-links a.btn { color: #fff; }

.mk-hero { padding: 72px 0 64px; background: radial-gradient(900px 460px at 88% -10%, rgba(220,38,38,.07), transparent 60%); }
.mk-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.mk-hero h1 { font-size: 50px; line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; margin: 0 0 18px; }
.mk-lede { font-size: 18px; line-height: 1.6; color: var(--m-text-2); max-width: 540px; margin: 0 0 26px; }
.mk-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.mk-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; color: var(--m-text-3); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.mk-hero-card { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-xl); box-shadow: var(--sh-pop); padding: 22px 24px; }
.mk-hc-head { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--m-text-2); text-transform: uppercase; letter-spacing: .04em; }
.mk-hc-score { font-family: var(--font-num); font-weight: 600; font-size: 64px; letter-spacing: -0.04em; color: var(--m-danger); line-height: 1; margin: 14px 0 2px; }
.mk-hc-score span { font-size: 22px; color: var(--m-text-3); }
.mk-hc-band { font-size: 13px; color: var(--m-danger); font-weight: 600; margin-bottom: 16px; }
.mk-hc-rows > div { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--m-line-2); font-size: 13.5px; color: var(--m-text-2); }
.mk-hc-rows b { font-family: var(--font-num); color: var(--m-text); }

.mk-section { padding: 76px 0; }
.mk-sec-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }
.mk-sec-head h2 { font-size: 34px; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 12px; }
.mk-sec-head p { font-size: 16.5px; color: var(--m-text-2); margin: 0; }

.mk-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mk-feat { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-lg); padding: 24px; }
.mk-feat-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--m-tint); color: var(--m-primary); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.mk-feat-ico svg { width: 21px; height: 21px; }
.mk-feat h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.mk-feat p { font-size: 14px; color: var(--m-text-2); line-height: 1.6; margin: 0; }

.mk-dark { background: var(--m-ink); }
.mk-intel { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.mk-intel h2 { font-size: 36px; letter-spacing: -0.03em; margin: 0 0 16px; }
.mk-intel p { font-size: 16.5px; line-height: 1.6; margin: 0 0 20px; }
.mk-check { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 11px; }
.mk-check li { position: relative; padding-left: 28px; color: rgba(255,255,255,.85); font-size: 15px; }
.mk-check li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 19px; height: 19px; border-radius: 50%; background: var(--m-primary); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.mk-check-ink li { color: var(--m-text-2); }
.mk-intel-viz { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-xl); padding: 18px; }
.mk-intel-viz svg { width: 100%; height: auto; }

.mk-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.mk-plan { position: relative; background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-xl); padding: 28px 24px; }
.mk-plan.featured { border: 2px solid var(--m-primary); box-shadow: var(--sh-pop); }
.mk-plan-tag { position: absolute; top: -12px; left: 24px; background: var(--m-primary); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; }
.mk-plan-name { font-size: 14px; font-weight: 600; color: var(--m-text-2); text-transform: uppercase; letter-spacing: .05em; }
.mk-plan-price { font-family: var(--font-num); font-size: 38px; font-weight: 600; letter-spacing: -0.03em; margin: 10px 0 2px; }
.mk-plan-price span { font-size: 16px; color: var(--m-text-3); font-weight: 500; }
.mk-plan-sub { font-size: 13.5px; color: var(--m-text-2); margin-bottom: 18px; }
.mk-plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 11px; }
.mk-plan li { position: relative; padding-left: 24px; font-size: 14px; color: var(--m-text); }
.mk-plan li::before { content: '✓'; position: absolute; left: 0; color: var(--m-primary); font-weight: 700; }

.mk-faq { background: var(--m-bg); }
.mk-faqs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 40px; max-width: 920px; margin: 0 auto; }
.mk-faq-i h4 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.mk-faq-i p { font-size: 14px; color: var(--m-text-2); line-height: 1.6; margin: 0; }

.mk-cta-band { background: linear-gradient(120deg, #B91C1C, #DC2626); padding: 64px 0; text-align: center; }
.mk-cta-band h2 { color: #fff; font-size: 32px; letter-spacing: -0.03em; margin: 0 0 24px; }
.mk-cta-band .mk-cta { justify-content: center; }

.mk-foot { border-top: 1px solid var(--m-line); padding: 40px 0; }
.mk-foot-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mk-foot p { font-size: 13px; color: var(--m-text-2); margin: 8px 0 0; }
.mk-foot-sm { color: var(--m-text-3) !important; font-size: 12px !important; }
.mk-foot-disc { max-width: 420px; font-size: 12px; color: var(--m-text-3); line-height: 1.6; text-align: right; }

/* Lead form page */
.mk-form-wrap { padding: 48px 0 72px; background: radial-gradient(800px 420px at 90% -10%, rgba(220,38,38,.06), transparent 60%); min-height: calc(100vh - 66px); }
.mk-form-grid { max-width: 1040px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: start; }
.mk-form-aside h1 { font-size: 34px; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 14px; }
.mk-form-card { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-xl); box-shadow: var(--sh-md); padding: 28px; }
.mk-form-fine { font-size: 11.5px; color: var(--m-text-3); margin: 12px 0 0; line-height: 1.5; }
.mk-thanks { max-width: 560px; margin: 0 auto; text-align: center; padding: 90px 24px; }
.mk-thanks h1 { font-size: 34px; letter-spacing: -0.03em; margin: 0 0 14px; }

@media (max-width: 860px) {
  .mk-hero-grid, .mk-intel, .mk-form-grid { grid-template-columns: 1fr; }
  .mk-features, .mk-plans, .mk-faqs { grid-template-columns: 1fr; }
  .mk-links a:not(.btn) { display: none; }
  .mk-hero h1 { font-size: 36px; }
  .mk-foot-disc { text-align: left; }
}

/* ============================================================================
   COMMAND CENTER — Phase 1 (hierarchy: hero / primary / supporting)
   ============================================================================ */
/* HERO — the single dominant element */
.ptwc-hero { position: relative; overflow: hidden; background: var(--m-surface); border: 1px solid var(--m-line);
  border-radius: var(--r-xl); box-shadow: var(--sh-pop); padding: 28px 32px; display: grid;
  grid-template-columns: 1.7fr 1fr; gap: 32px; margin-bottom: 18px; }
.ptwc-hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--m-primary); }
.ptwc-hero .eyebrow { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--m-text-3); }
.ptwc-hero-score { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.ptwc-hero-score .num { font-family: var(--font-num); font-weight: 600; font-size: 66px; letter-spacing: -.045em; line-height: .95; color: var(--m-text); }
.ptwc-hero-score .den { font-size: 22px; color: var(--m-text-3); font-weight: 500; }
.ptwc-hero-class { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; padding: 6px 13px; border-radius: 999px; align-self: center; }
.ptwc-hero-class.low { background: rgba(22,163,74,.12); color: #15803d; }
.ptwc-hero-class.mod { background: rgba(245,158,11,.14); color: #b45309; }
.ptwc-hero-class.elev { background: rgba(220,38,38,.10); color: var(--m-danger); }
.ptwc-hero-track { height: 8px; border-radius: 999px; background: var(--m-line-2); overflow: hidden; margin: 16px 0 0; max-width: 540px; }
.ptwc-hero-track > span { display: block; height: 100%; border-radius: 999px; }
.ptwc-hero-programs { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 20px; }
.ptwc-prog { display: flex; flex-direction: column; gap: 4px; min-width: 124px; }
.ptwc-prog .pl { font-size: 12px; color: var(--m-text-2); }
.ptwc-prog .ps { font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ptwc-prog .ps .d { width: 7px; height: 7px; border-radius: 50%; }
.ptwc-prog .ps.ok { color: #15803d; } .ptwc-prog .ps.ok .d { background: var(--m-success); }
.ptwc-prog .ps.na { color: var(--m-text-3); font-style: italic; font-weight: 500; } .ptwc-prog .ps.na .d { background: var(--m-text-3); }
.ptwc-hero-coverage { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--m-line-2); font-size: 12px; color: var(--m-text-3); line-height: 1.7; }
.ptwc-hero-side { border-left: 1px solid var(--m-line-2); padding-left: 30px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.ptwc-hero-side .ttl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--m-text-3); margin-bottom: 8px; }
.ptwc-hero-sig { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--m-line-2); }
.ptwc-hero-sig:first-of-type { border-top: 0; }
.ptwc-hero-sig .l { font-size: 13px; color: var(--m-text-2); }
.ptwc-hero-sig .v { font-family: var(--font-num); font-weight: 600; font-size: 24px; color: var(--m-text); }
.ptwc-hero-sig .v.crit { color: var(--m-danger); }
@media (max-width: 980px) { .ptwc-hero { grid-template-columns: 1fr; } .ptwc-hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--m-line-2); padding-top: 16px; } }

/* PRIMARY tier — the canvas panels (map / graph) get more presence */
.ptwc-section.tier-primary { box-shadow: var(--sh-md); }
.ptwc-section.tier-primary > .ptwc-section-head { padding: 18px 22px 14px; }

/* Relationship Intelligence preview */
.ptwc-relprev { position: relative; height: 248px; }
.ptwc-relprev svg { width: 100%; height: 100%; display: block; }
.ptwc-relprev-cta { position: absolute; right: 14px; bottom: 12px; }

/* INVESTIGATION PIPELINE */
.ptwc-pipeline { display: flex; align-items: stretch; gap: 0; overflow-x: auto; }
.ptwc-pl-stage { flex: 1 1 0; min-width: 110px; padding: 14px 14px 14px 18px; position: relative; }
.ptwc-pl-stage + .ptwc-pl-stage { border-left: 1px solid var(--m-line-2); }
.ptwc-pl-stage .n { font-family: var(--font-num); font-weight: 600; font-size: 24px; color: var(--m-text); line-height: 1; }
.ptwc-pl-stage .n.na { font-size: 14px; color: var(--m-text-3); font-style: italic; font-weight: 500; }
.ptwc-pl-stage .s { font-size: 11.5px; color: var(--m-text-2); margin-top: 5px; }
.ptwc-pl-stage::after { content: '›'; position: absolute; right: -7px; top: 50%; transform: translateY(-50%); color: var(--m-text-3); font-size: 18px; z-index: 2; background: var(--m-surface); line-height: 1; }
.ptwc-pl-stage:last-child::after { display: none; }
.ptwc-pl-note { font-size: 11.5px; color: var(--m-text-3); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--m-line-2); }

/* SUPPORTING tier — compact KPI strip (kills the 8 big tiles) */
.ptwc-kpistrip { display: grid; grid-template-columns: repeat(6, 1fr); background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); }
.ptwc-kpistrip .c { padding: 15px 18px; border-right: 1px solid var(--m-line-2); }
.ptwc-kpistrip .c:last-child { border-right: 0; }
.ptwc-kpistrip .v { font-family: var(--font-num); font-weight: 600; font-size: 23px; color: var(--m-text); letter-spacing: -.02em; }
.ptwc-kpistrip .v small { font-size: 13px; color: var(--m-text-3); }
.ptwc-kpistrip .l { font-size: 11.5px; color: var(--m-text-2); margin-top: 3px; }
@media (max-width: 980px) { .ptwc-kpistrip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .ptwc-kpistrip { grid-template-columns: repeat(2, 1fr); } }

/* "Requires instrumentation" inline tag */
.ptwc-ri { font-size: 10.5px; font-style: italic; color: var(--m-text-3); }

/* ============================================================================
   Enterprise navy chrome (institutional sidebar) — red stays brand/action
   ============================================================================ */
:root { --m-navy: #001F54; --m-navy-2: #0A2540; }
.ptwc-sidebar { background: linear-gradient(185deg, var(--m-navy) 0%, var(--m-navy-2) 100%); border-right: 1px solid rgba(255,255,255,.07); }
.ptwc-sidebar .logo-full, .ptwc-sidebar .logo-mark { filter: brightness(0) invert(1); }
.ptwc-side-brand .badge-ptwc { background: rgba(255,255,255,.12); color: #fff; }
.ptwc-side-group { color: rgba(255,255,255,.40); }
.ptwc-side-link { color: rgba(255,255,255,.72); }
.ptwc-side-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.ptwc-side-link.active { background: rgba(193,18,31,.22); color: #fff; box-shadow: inset 3px 0 0 var(--m-primary); }
.ptwc-side-link.active svg { stroke-width: 2.2; }
.ptwc-side-foot { border-top-color: rgba(255,255,255,.10); }
.ptwc-side-btn { color: rgba(255,255,255,.62); }
.ptwc-side-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
.ptwc-side-brandline { color: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; white-space: nowrap; }
.ptwc-app.collapsed .ptwc-side-brandline { display: none; }
[data-theme="dark"] .ptwc-sidebar { background: linear-gradient(185deg, #00112E, #060B16); }

/* ============================================================================
   Demo sandbox
   ============================================================================ */
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(220,38,38,.08), rgba(220,38,38,.04)); border-bottom: 1px solid var(--m-line);
  padding: 9px 28px; font-size: 12.5px; color: var(--m-text); }
.demo-banner-msg { display: flex; align-items: center; gap: 8px; color: var(--m-text-2); }
.demo-banner-msg svg { width: 15px; height: 15px; color: var(--m-primary); }
.demo-banner-msg b { color: var(--m-primary); }
.demo-usage { display: flex; align-items: center; gap: 14px; }
.demo-usage > span { font-size: 11.5px; color: var(--m-text-3); font-family: var(--font-num); }

.demo-case-card { display: block; height: 100%; background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-lg);
  padding: 18px; transition: box-shadow .18s, border-color .18s, transform .18s; color: var(--m-text); }
.demo-case-card:hover { box-shadow: var(--sh-md); border-color: var(--m-text-3); transform: translateY(-2px); color: var(--m-text); }
.demo-case-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.demo-case-sub { font-size: 12px; color: var(--m-text-3); margin: 2px 0 10px; }
.demo-case-head { font-size: 13.5px; color: var(--m-text-2); line-height: 1.5; min-height: 40px; }
.demo-case-foot { font-size: 12px; color: var(--m-text-3); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--m-line-2); font-family: var(--font-num); display: flex; justify-content: space-between; }
.demo-case-foot .arrow { color: var(--m-primary); font-weight: 700; }

.demo-watermark { position: absolute; right: -10px; top: -18px; font-family: var(--font-head); font-weight: 800; font-size: 120px;
  letter-spacing: .05em; color: rgba(255,255,255,.06); pointer-events: none; user-select: none; }

.demo-lock { width: 60px; height: 60px; border-radius: 16px; background: var(--m-tint); color: var(--m-primary);
  display: flex; align-items: center; justify-content: center; }
.demo-lock svg { width: 26px; height: 26px; }

/* ================================================================
   WALLET INTELLIGENCE™  +  COMPLIANCE KANBAN BOARD™
   ================================================================ */
#wiRoot, #boardRoot { padding: 22px 24px 26px; }

/* Analyzer ------------------------------------------------------ */
.wi-analyzer { background: var(--m-bg); border: 1px solid var(--m-line); border-radius: var(--r-lg); padding: 16px; }
.wi-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.wi-field { display: flex; flex-direction: column; gap: 6px; }
.wi-field-grow { flex: 1 1 360px; }
.wi-field label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--m-text-3); }
.wi-field input, .wi-field select {
  height: 44px; border: 1px solid var(--m-line); border-radius: 10px; background: var(--m-surface);
  padding: 0 13px; font-size: 14px; color: var(--m-text); font-family: var(--font-num);
}
.wi-field input:focus, .wi-field select:focus { outline: none; border-color: var(--m-primary); box-shadow: 0 0 0 4px var(--m-tint); }
.wi-analyze-btn { height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; }
.wi-hint { margin-top: 10px; font-size: 12px; color: var(--m-text-3); }
.wi-hint-err { color: var(--m-danger); font-weight: 600; }

/* Result -------------------------------------------------------- */
.wi-result { margin-top: 22px; }
.wi-result-head { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 16px; }
@media (max-width: 880px) { .wi-result-head { grid-template-columns: 1fr; } }

.wi-score-card { display: flex; gap: 20px; align-items: center; background: var(--m-surface); border: 1px solid var(--m-line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh); }
.wi-gauge { position: relative; width: 120px; height: 120px; flex: 0 0 120px; }
.wi-gauge-track { fill: none; stroke: var(--m-line-2); stroke-width: 10; }
.wi-gauge-fill { fill: none; stroke: var(--m-success); stroke-width: 10; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 60px 60px; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1), stroke .4s; }
.wi-gauge-fill.g-r-low { stroke: var(--m-success); }
.wi-gauge-fill.g-r-medium { stroke: #0EA5E9; }
.wi-gauge-fill.g-r-elevated { stroke: var(--m-warning); }
.wi-gauge-fill.g-r-high { stroke: #EA580C; }
.wi-gauge-fill.g-r-critical { stroke: var(--m-danger); }
.wi-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wi-gauge-num { font-family: var(--font-num); font-weight: 700; font-size: 30px; letter-spacing: -.03em; color: var(--m-text); line-height: 1; }
.wi-gauge-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--m-text-3); margin-top: 3px; }
.wi-score-meta { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.wi-score-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--m-text-2); }
.wi-score-row strong { color: var(--m-text); font-family: var(--font-num); }

.wi-recommend { background: var(--m-surface); border: 1px solid var(--m-line); border-left: 4px solid var(--m-text-3); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 10px; }
.wi-recommend.rec-proceed { border-left-color: var(--m-success); }
.wi-recommend.rec-monitor { border-left-color: #0EA5E9; }
.wi-recommend.rec-review  { border-left-color: var(--m-warning); }
.wi-recommend.rec-edd     { border-left-color: #EA580C; }
.wi-recommend.rec-reject  { border-left-color: var(--m-danger); }
.wi-recommend-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--m-text-3); }
.wi-recommend-val { font-size: 22px; font-weight: 700; color: var(--m-text); letter-spacing: -.02em; }
.rec-reject .wi-recommend-val { color: var(--m-danger); }
.rec-proceed .wi-recommend-val { color: var(--m-success); }
.wi-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.wi-meta-line { font-size: 11.5px; color: var(--m-text-3); font-family: var(--font-num); }

/* Copilot ------------------------------------------------------- */
.wi-copilot { margin-top: 16px; background: linear-gradient(180deg, rgba(220,38,38,.04), var(--m-surface)); border: 1px solid var(--m-line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sh); }
.wi-copilot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.wi-copilot-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--m-primary); background: var(--m-tint); padding: 4px 10px; border-radius: 999px; }
.wi-copilot-sub { font-size: 11px; color: var(--m-text-3); font-family: var(--font-num); }
.wi-copilot-text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--m-text); }

/* Panels -------------------------------------------------------- */
.wi-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
@media (max-width: 880px) { .wi-grid { grid-template-columns: 1fr; } }
.wi-panel { padding: 16px; }
.wi-panel-title { font-size: 13px; font-weight: 600; color: var(--m-text); margin: 0 0 12px; }
.wi-list { display: flex; flex-direction: column; gap: 8px; }
.wi-row { display: flex; flex-direction: column; gap: 3px; padding: 9px 0; border-top: 1px solid var(--m-line-2); }
.wi-row:first-child { border-top: 0; }
.wi-row-clean { color: var(--m-text-3); font-size: 13px; }
.wi-row-sub { font-size: 11.5px; color: var(--m-text-3); font-family: var(--font-num); }
.wi-cp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wi-cp-label { font-size: 12px; color: var(--m-text-2); }
.wi-mono { font-family: var(--font-num); font-size: 12.5px; color: var(--m-text); }
.wi-tag { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; text-transform: capitalize; }
.wi-tag-bad { background: rgba(220,38,38,.1); color: var(--m-danger); }
.wi-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.wi-dot.on { background: var(--m-danger); box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.wi-dot.off { background: var(--m-line); }

/* Recent table -------------------------------------------------- */
.wi-recent { margin-top: 18px; padding: 16px; }
.wi-recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wi-link { font-size: 12.5px; font-weight: 600; color: var(--m-primary); }
.wi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wi-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--m-text-3); padding: 8px 10px; border-bottom: 1px solid var(--m-line); }
.wi-table td { padding: 10px; border-bottom: 1px solid var(--m-line-2); color: var(--m-text-2); }
.wi-table td strong { color: var(--m-text); font-family: var(--font-num); }
.wi-empty { text-align: center; color: var(--m-text-3); padding: 22px 0; }
.wi-dim { color: var(--m-text-3); font-family: var(--font-num); font-size: 12px; }
.wi-status { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--m-line-2); color: var(--m-text-2); white-space: nowrap; }
.wi-status-approved { background: rgba(22,163,74,.12); color: var(--m-success); }
.wi-status-rejected { background: rgba(220,38,38,.12); color: var(--m-danger); }
.wi-status-edd, .wi-status-analyst_review { background: rgba(245,158,11,.14); color: #B45309; }
.wi-status-monitoring { background: rgba(14,165,233,.12); color: #0369A1; }

/* Kanban -------------------------------------------------------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { background: var(--m-bg); border: 1px solid var(--m-line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 320px; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid var(--m-line); }
.kanban-col-title { font-size: 12px; font-weight: 600; color: var(--m-text); }
.kanban-count { font-size: 11px; font-weight: 600; color: var(--m-text-3); background: var(--m-surface); border: 1px solid var(--m-line); border-radius: 999px; min-width: 22px; text-align: center; padding: 1px 6px; }
.kanban-drop { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 10px; transition: background .15s; }
.kanban-drop.drag-over { background: var(--m-tint); outline: 2px dashed var(--m-primary); outline-offset: -6px; border-radius: var(--r); }
.kanban-card { background: var(--m-surface); border: 1px solid var(--m-line); border-radius: 10px; padding: 12px; box-shadow: var(--sh); cursor: grab; transition: box-shadow .15s, transform .1s; }
.kanban-card:hover { box-shadow: var(--sh-md); }
.kanban-card.dragging { opacity: .5; transform: scale(.98); }
.kanban-card.card-ok { box-shadow: 0 0 0 2px var(--m-success); }
.kanban-card.card-err { box-shadow: 0 0 0 2px var(--m-danger); }
.kanban-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.kanban-risk { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.kanban-risk-low { background: rgba(22,163,74,.12); color: var(--m-success); }
.kanban-risk-medium { background: rgba(14,165,233,.12); color: #0369A1; }
.kanban-risk-elevated { background: rgba(245,158,11,.14); color: #B45309; }
.kanban-risk-high { background: rgba(234,88,12,.14); color: #C2410C; }
.kanban-risk-critical { background: rgba(220,38,38,.14); color: var(--m-danger); }
.kanban-trust { font-family: var(--font-num); font-weight: 700; font-size: 15px; color: var(--m-text); }
.kanban-addr { font-family: var(--font-num); font-size: 12.5px; color: var(--m-text); margin-bottom: 6px; }
.kanban-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.kanban-chain { font-size: 11px; color: var(--m-text-3); }
.kanban-exposure { font-size: 11px; color: var(--m-text-2); text-align: right; }
.kanban-rec { font-size: 11.5px; font-weight: 600; color: var(--m-text-2); border-top: 1px dashed var(--m-line-2); padding-top: 7px; }

/* ==================================================================
   APPLE-NATIVE REDESIGN — light system (override layer, last-wins)
   Reserve red strictly for risk: critical, sanctions, reject.
   ================================================================== */
:root {
  --m-bg:       #F7F8FA;
  --m-surface:  #FFFFFF;
  --m-elevated: rgba(255,255,255,.86);
  --m-text:     #111827;
  --m-text-2:   #6B7280;
  --m-text-3:   #9CA3AF;
  --m-line:     #E5E7EB;
  --m-line-2:   #EEF0F4;
  --m-hover:    rgba(17,24,39,.045);
  --m-primary:  #DC2626;            /* risk red — used only for risk UI */
  --m-ink:      #111827;            /* neutral action color */
  --m-success:  #10B981;
  --m-warning:  #F59E0B;
  --m-danger:   #DC2626;
  --m-tint:     rgba(17,24,39,.05);
  --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-xl: 22px;
  --sh:    0 1px 2px rgba(16,24,40,.04);
  --sh-md: 0 8px 24px rgba(16,24,40,.08);
  --sh-pop:0 16px 40px rgba(16,24,40,.12);
  --header-h: 64px;
}
body, .ptwc-app { background: var(--m-bg); color: var(--m-text); }

/* ---- Light native sidebar (macOS-style) ---- */
.ptwc-sidebar {
  background: var(--m-bg);
  border-right: 1px solid var(--m-line);
  padding: 16px 12px;
}
[data-theme="dark"] .ptwc-sidebar { background: var(--m-bg); }
.ptwc-sidebar .logo-full, .ptwc-sidebar .logo-mark { filter: brightness(0) saturate(0); opacity: .9; }
.ptwc-side-brandline { color: var(--m-text-3) !important; }
.ptwc-side-brand .badge-ptwc { color: var(--m-text-2); background: var(--m-tint); }
.ptwc-side-group { color: var(--m-text-3); font-size: 11px; letter-spacing: .06em; padding: 16px 12px 6px; }
.ptwc-side-link { color: var(--m-text-2); border-radius: 10px; font-size: 13.5px; padding: 8px 11px; }
.ptwc-side-link svg { color: var(--m-text-3); stroke-width: 1.8; }
.ptwc-side-link:hover { background: var(--m-hover); color: var(--m-text); }
.ptwc-side-link:hover svg { color: var(--m-text-2); }
.ptwc-side-link.active {
  background: var(--m-surface); color: var(--m-text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,24,40,.06); border: 1px solid var(--m-line-2);
}
.ptwc-side-link.active svg { color: var(--m-ink); stroke-width: 2; }
[data-theme="dark"] .ptwc-side-link.active { background: var(--m-surface); color: var(--m-text); }
.ptwc-side-foot { border-top: 1px solid var(--m-line-2); }
.ptwc-side-btn { color: var(--m-text-2); border-radius: 10px; }
.ptwc-side-btn:hover { background: var(--m-hover); color: var(--m-text); }

/* ---- Floating glass header ---- */
.ptwc-header {
  height: var(--header-h);
  background: var(--m-elevated);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--m-line);
  padding: 0 24px;
}
.ptwc-search { height: 40px; border-radius: 12px; background: var(--m-surface); border: 1px solid var(--m-line); font-size: 13.5px; }
.ptwc-search:focus { border-color: #D1D5DB; box-shadow: 0 0 0 4px rgba(17,24,39,.05); }
.ptwc-kbd { background: var(--m-bg); border-color: var(--m-line); }
.ptwc-icon-btn { border-radius: 11px; }
.ptwc-icon-btn .ptwc-dot { background: var(--m-primary); }
.ptwc-lang { border-radius: 11px; border-color: var(--m-line); }
.ptwc-lang a.active { background: var(--m-ink); color: #fff; }
.ptwc-avatar { border-radius: 11px; background: var(--m-ink); }

/* ---- Cards & surfaces ---- */
.ptwc-card, .card, .ptwc-section, .wi-panel, .wi-recent, .wi-score-card, .wi-recommend, .wi-analyzer {
  border-radius: 20px; background: var(--m-surface);
  border: 1px solid var(--m-line-2); box-shadow: var(--sh);
}
.ptwc-section { border-radius: 22px; }
.ptwc-card:hover, .wi-panel:hover { box-shadow: var(--sh-md); transform: translateY(-1px); transition: box-shadow .2s, transform .2s; }
.wi-analyzer { background: var(--m-surface); }

/* ---- Buttons: neutral ink primary; red only for risk actions ---- */
.btn.ptwc-btn-primary, .ptwc-btn-primary {
  background: var(--m-ink); border: 1px solid var(--m-ink); color: #fff;
  border-radius: 12px; font-weight: 550; box-shadow: var(--sh);
}
.btn.ptwc-btn-primary:hover, .ptwc-btn-primary:hover { background: #000; border-color: #000; }
.ptwc-btn-dark { background: var(--m-ink); border-color: var(--m-ink); border-radius: 12px; }
.ptwc-btn-ghost { background: var(--m-surface); border: 1px solid var(--m-line); color: var(--m-text); border-radius: 12px; }
.ptwc-btn-ghost:hover { background: var(--m-hover); }
.ptwc-quick { border-radius: 12px; }

/* ---- Headings ---- */
.ptwc-h1 { font-size: 30px; letter-spacing: -.02em; font-weight: 650; color: var(--m-text); }
.ptwc-eyebrow { color: var(--m-text-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11.5px; }
.ptwc-sub { color: var(--m-text-2); }

/* ---- Wallet Intelligence screen ---- */
#wiRoot, #boardRoot { padding: 26px 28px 30px; }
.wi-analyzer { padding: 20px; border-radius: 20px; }
.wi-field input, .wi-field select { height: 46px; border-radius: 13px; border-color: var(--m-line); }
.wi-field input:focus, .wi-field select:focus { border-color: var(--m-ink); box-shadow: 0 0 0 4px rgba(17,24,39,.06); }
.wi-analyze-btn { height: 46px; border-radius: 13px; }
.wi-score-card, .wi-recommend { border-radius: 20px; padding: 22px; }
.wi-gauge-num { font-weight: 650; }

/* ---- AI Compliance Copilot — Apple Intelligence panel ---- */
.wi-copilot {
  border-radius: 20px; padding: 20px 22px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(99,102,241,.06), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(236,72,153,.05), transparent 55%),
    var(--m-surface);
  border: 1px solid var(--m-line-2); box-shadow: var(--sh);
}
.wi-copilot-badge {
  background: linear-gradient(90deg, #6366F1, #EC4899); color: #fff;
  border-radius: 999px; font-weight: 600; letter-spacing: .01em; padding: 4px 11px;
}
.wi-copilot-text { color: var(--m-text); font-size: 15px; line-height: 1.62; }
.wi-copilot-sub { color: var(--m-text-3); }

/* ---- Rating pills (risk-coded) ---- */
.ptwc-rating { border-radius: 999px; font-weight: 600; }
.ptwc-chip { border-radius: 999px; }

/* ---- Premium Kanban (Linear/Jira) ---- */
.kanban { gap: 16px; padding-bottom: 10px; }
.kanban-col {
  background: transparent; border: 0; min-height: 360px;
}
.kanban-col-head { padding: 6px 8px 12px; border-bottom: 0; }
.kanban-col-title { font-size: 12.5px; font-weight: 600; color: var(--m-text-2); letter-spacing: .01em; }
.kanban-count { background: var(--m-surface); border: 1px solid var(--m-line-2); color: var(--m-text-3); }
.kanban-drop { background: var(--m-bg); border: 1px solid var(--m-line-2); border-radius: 18px; padding: 12px; gap: 12px; min-height: 320px; }
.kanban-drop.drag-over { background: var(--m-hover); outline: 2px dashed #C7CBD3; }
.kanban-card {
  border-radius: 18px; background: var(--m-surface);
  border: 1px solid var(--m-line-2); box-shadow: var(--sh); padding: 14px;
}
.kanban-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.kanban-card-top { margin-bottom: 9px; }
.kanban-risk { border-radius: 999px; font-size: 9.5px; padding: 2px 9px; }
.kanban-trust { font-weight: 650; }
.kanban-nick { font-size: 14.5px; font-weight: 600; color: var(--m-text); letter-spacing: -.01em; line-height: 1.25; }
.kanban-addr { font-size: 11.5px; color: var(--m-text-3); margin-bottom: 8px; }
.kanban-meta { margin-bottom: 8px; }
.kanban-chain, .kanban-exposure { font-size: 11px; color: var(--m-text-2); }
.kanban-rec { border-top: 1px solid var(--m-line-2); color: var(--m-text-2); font-weight: 550; }
/* critical card → subtle red tint, never an aggressive block */
.kanban-card:has(.kanban-risk-critical) { background: linear-gradient(180deg, rgba(220,38,38,.04), var(--m-surface)); border-color: rgba(220,38,38,.16); }

/* ---- Recent table ---- */
.wi-recent { border-radius: 20px; }
.wi-status { border-radius: 999px; }

/* ---- Responsive / mobile ---- */
@media (max-width: 1024px) {
  #wiRoot, #boardRoot { padding: 18px 16px 22px; }
  .ptwc-h1 { font-size: 25px; }
  .wi-result-head { grid-template-columns: 1fr; }
  .wi-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  /* sidebar becomes a usable icon rail (no off-canvas, no extra JS) */
  .ptwc-app, .ptwc-app.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }
  .ptwc-sidebar { padding: 14px 8px; }
  .ptwc-side-link span, .ptwc-side-btn span, .ptwc-side-group,
  .ptwc-side-brandline, .ptwc-side-brand .badge-ptwc, .ptwc-sidebar .logo-full { display: none; }
  .ptwc-sidebar .logo-mark { display: block; }
  .ptwc-side-link, .ptwc-side-btn { justify-content: center; padding: 9px; }
  .ptwc-header { padding: 0 14px; }
  .ptwc-search-wrap { max-width: none; }
  .kanban { grid-auto-columns: 82%; }
  .wi-form { flex-direction: column; align-items: stretch; }
  .wi-analyze-btn { width: 100%; }
}

/* ==================================================================
   IA REDESIGN — subtle section labels + Intelligence Hub tabs
   ================================================================== */
.ptwc-side-group {
  text-transform: none;            /* Apple-Settings: no all-caps */
  letter-spacing: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--m-text-3);
  padding: 18px 12px 6px;
}
/* Intelligence Hub: pills rendered as a clean tab bar */
.ihub-tabs { background: var(--m-bg); border: 1px solid var(--m-line-2); border-radius: 12px; padding: 3px; gap: 2px; }
.ihub-tabs button {
  border: 0; background: transparent; color: var(--m-text-2);
  font-size: 13px; font-weight: 550; padding: 6px 13px; border-radius: 9px;
  cursor: pointer; transition: .14s;
}
.ihub-tabs button:hover { color: var(--m-text); background: var(--m-hover); }
.ihub-tabs button.active {
  background: var(--m-surface); color: var(--m-text);
  box-shadow: 0 1px 2px rgba(16,24,40,.08); border: 1px solid var(--m-line-2);
}

/* ==================================================================
   SETTLEMENT MODULE — enterprise corporate-banking UI
   ================================================================== */
.stl-section { padding: 26px 28px 30px; }
.stl-flash { padding: 11px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; }
.stl-flash.ok { background: rgba(16,185,129,.10); color: #047857; border: 1px solid rgba(16,185,129,.25); }
.stl-flash.err { background: rgba(220,38,38,.08); color: var(--m-danger); border: 1px solid rgba(220,38,38,.22); }

.stl-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.stl-kpi { background: var(--m-surface); border: 1px solid var(--m-line-2); border-radius: 16px; padding: 14px 16px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 3px; }
.stl-kpi.warn { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.05); }
.stl-kpi-l { font-size: 11px; color: var(--m-text-3); text-transform: uppercase; letter-spacing: .03em; }
.stl-kpi-v { font-family: var(--font-num); font-weight: 650; font-size: 22px; color: var(--m-text); letter-spacing: -.02em; }
.stl-kpi-u { font-size: 10.5px; color: var(--m-text-3); }
@media (max-width:1100px){ .stl-kpis{ grid-template-columns: repeat(3,1fr);} }
@media (max-width:640px){ .stl-kpis{ grid-template-columns: repeat(2,1fr);} }

.stl-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.stl-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width:900px){ .stl-grid, .stl-detail { grid-template-columns: 1fr; } }
.stl-panel { padding: 16px 18px; margin-bottom: 16px; }
.stl-panel-t { font-size: 13px; font-weight: 650; color: var(--m-text); margin: 0 0 12px; }

.stl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stl-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--m-text-3); padding: 8px 10px; border-bottom: 1px solid var(--m-line); }
.stl-table td { padding: 10px; border-bottom: 1px solid var(--m-line-2); color: var(--m-text-2); vertical-align: middle; }
.stl-table tr:hover td { background: var(--m-hover); }
.stl-table .r { text-align: right; }
.stl-table .mono, .mono { font-family: var(--font-num); }
.stl-table .sm, .sm { font-size: 11.5px; }
.stl-dim { color: var(--m-text-3); }
.stl-empty { text-align: center; color: var(--m-text-3); padding: 22px 0; }

.stl-status { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--m-line-2); color: var(--m-text-2); white-space: nowrap; }
.stl-status.s-compliance-hold { background: rgba(245,158,11,.14); color: #b45309; }
.stl-status.s-rejected, .stl-status.s-failed { background: rgba(220,38,38,.10); color: var(--m-danger); }
.stl-status.s-approved-for-settlement, .stl-status.s-paid, .stl-status.s-reconciled { background: rgba(16,185,129,.12); color: #047857; }
.stl-status.s-exported, .stl-status.s-batched, .stl-status.s-uploaded-to-bank { background: rgba(37,99,235,.10); color: #1d4ed8; }

.stl-risk { display:inline-block; min-width: 30px; text-align:center; font-family: var(--font-num); font-weight: 650; font-size: 12px; padding: 2px 7px; border-radius: 7px; }
.stl-risk.r-low { background: rgba(16,185,129,.12); color:#047857; }
.stl-risk.r-medium { background: rgba(14,165,233,.12); color:#0369a1; }
.stl-risk.r-elevated { background: rgba(245,158,11,.16); color:#b45309; }
.stl-risk.r-high { background: rgba(234,88,12,.16); color:#c2410c; }
.stl-risk.r-critical { background: rgba(220,38,38,.16); color: var(--m-danger); }
.stl-risk-badge { display:inline-block; font-size:12px; font-weight:600; padding:7px 12px; border-radius:10px; margin-bottom:12px; }
.stl-risk-badge.r-low{background:rgba(16,185,129,.1);color:#047857;} .stl-risk-badge.r-medium{background:rgba(14,165,233,.1);color:#0369a1;}
.stl-risk-badge.r-elevated{background:rgba(245,158,11,.14);color:#b45309;} .stl-risk-badge.r-high{background:rgba(234,88,12,.14);color:#c2410c;}
.stl-risk-badge.r-critical{background:rgba(220,38,38,.12);color:var(--m-danger);}

.stl-dl { display: grid; grid-template-columns: 1fr; gap: 0; }
.stl-dl > div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--m-line-2); }
.stl-dl > div:first-child { border-top: 0; }
.stl-dl dt { margin: 0; font-size: 12px; color: var(--m-text-3); }
.stl-dl dd { margin: 0; font-size: 13px; color: var(--m-text); word-break: break-all; }
.stl-dl dd.mono { font-family: var(--font-num); }

.stl-fees { margin-top: 14px; border-top: 1px solid var(--m-line); padding-top: 10px; }
.stl-fees > div { display: flex; justify-content: space-between; font-size: 13px; color: var(--m-text-2); padding: 4px 0; }
.stl-fees .tot { border-top: 1px solid var(--m-line-2); margin-top: 6px; padding-top: 8px; font-size: 15px; color: var(--m-text); font-weight: 650; }
.stl-fees b { font-family: var(--font-num); color: var(--m-text); }

.stl-actions textarea { width: 100%; border: 1px solid var(--m-line); border-radius: 12px; padding: 10px 12px; font-size: 13px; resize: vertical; margin-bottom: 10px; }
.stl-act-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.stl-btn-danger { background: var(--m-danger); border: 1px solid var(--m-danger); color: #fff; border-radius: 10px; }
.stl-btn-danger:hover { background: #b91c1c; }

.stl-filters { display: flex; gap: 10px; margin-bottom: 14px; }
.stl-filters select, .stl-input { height: 40px; border: 1px solid var(--m-line); border-radius: 11px; padding: 0 12px; font-size: 13px; background: var(--m-surface); color: var(--m-text); }
.stl-input { width: 100%; margin-bottom: 6px; }
.stl-lbl { display:block; font-size: 11px; text-transform: uppercase; letter-spacing:.03em; color: var(--m-text-3); margin: 12px 0 5px; }
.stl-build-top { display:flex; gap:10px; margin-bottom: 12px; }
.stl-row-actions { display:flex; gap:6px; flex-wrap: wrap; }
.stl-row-actions form { margin:0; }
.stl-code { font-family: var(--font-num); font-size: 12.5px; background: var(--m-bg); border: 1px solid var(--m-line-2); border-radius: 10px; padding: 9px 12px; word-break: break-all; color: var(--m-text); }

/* ==================================================================
   MOTION & INTERACTION LAYER — Emil Kowalski design-engineering pass
   Append-only. Reserves animation for purpose; press feedback everywhere;
   custom easing; reduced-motion + touch-safe. No layout/logic changes.
   ================================================================== */
:root {
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);     /* strong ease-out for entrances/feedback */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);    /* on-screen movement */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);     /* iOS-like panels */
}

/* ---- Press feedback: the UI must feel like it's listening ---- */
.btn, .ptwc-btn-primary, .ptwc-btn-dark, .ptwc-btn-ghost, .stl-btn-danger {
  transition:
    transform 160ms var(--ease-out),
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 200ms var(--ease-out);
}
.btn:active, .ptwc-btn-primary:active, .ptwc-btn-dark:active,
.ptwc-btn-ghost:active, .stl-btn-danger:active { transform: scale(0.97); }

.ptwc-icon-btn { transition: transform 140ms var(--ease-out), background-color 140ms ease, color 140ms ease; }
.ptwc-icon-btn:active { transform: scale(0.92); }

.ptwc-pills > a, .ptwc-pills > button, .ihub-tabs button, .ptwc-lang a {
  transition: transform 140ms var(--ease-out), background-color 140ms ease, color 140ms ease, box-shadow 160ms var(--ease-out);
}
.ptwc-pills > button:active, .ihub-tabs button:active, .ptwc-lang a:active { transform: scale(0.96); }

.ptwc-side-link, .ptwc-side-btn {
  transition: transform 130ms var(--ease-out), background-color 130ms ease, color 130ms ease;
}
.ptwc-side-link:active, .ptwc-side-btn:active { transform: scale(0.985); }

/* ---- Cards: deliberate hover lift on real easing ---- */
.ptwc-card, .ptwc-section, .wi-panel, .stl-panel, .stl-kpi, .demo-case-card {
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.kanban-card { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.kanban-card:active { transform: scale(0.985); cursor: grabbing; }

/* ---- Inputs: focus ring on real easing ---- */
.wi-field input, .wi-field select, .stl-input, .stl-filters select, .form-control, .form-select, .ptwc-search {
  transition: border-color 150ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 150ms ease;
}

/* ---- Flash messages: gentle, purposeful entrance (rare event) ---- */
.stl-flash {
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}
@starting-style { .stl-flash { opacity: 0; transform: translateY(-6px); } }

/* ---- Touch devices: no phantom hover-lift on tap ---- */
@media (hover: none) {
  .ptwc-card:hover, .ptwc-section:hover, .wi-panel:hover, .stl-panel:hover,
  .stl-kpi:hover, .kanban-card:hover, .demo-case-card:hover { transform: none; box-shadow: var(--sh); }
}

/* ---- Respect reduced motion: keep opacity/color, remove movement ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 120ms !important;
  }
  .btn:active, .ptwc-icon-btn:active, .kanban-card:active,
  .ptwc-card:hover, .wi-panel:hover, .kanban-card:hover,
  .demo-case-card:hover, .stl-kpi:hover { transform: none !important; }
  .ptwc-skeleton { animation: none !important; }
}

/* ==================================================================
   DASHBOARD REFINEMENT — Apple-native pass on the Command Center
   ================================================================== */
.ptwc-page-header { margin-bottom: 22px; }
.ptwc-page-title { font-size: 30px; font-weight: 650; letter-spacing: -.025em; }
.ptwc-micro-label { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--m-text-3); }

/* KPI metrics as separate rounded cards (lifted to top) */
.ptwc-kpistrip.ptwc-kpi-cards {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  background: transparent; border: 0; box-shadow: none; border-radius: 0; overflow: visible;
}
.ptwc-kpistrip.ptwc-kpi-cards .c {
  background: var(--m-surface); border: 1px solid var(--m-line-2); border-radius: 16px;
  padding: 15px 16px; box-shadow: var(--sh);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.ptwc-kpistrip.ptwc-kpi-cards .c:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.ptwc-kpistrip.ptwc-kpi-cards .v { font-size: 25px; font-weight: 650; letter-spacing: -.025em; }
.ptwc-kpistrip.ptwc-kpi-cards .v.crit { color: var(--m-danger); }
.ptwc-kpistrip.ptwc-kpi-cards .l { font-size: 11.5px; color: var(--m-text-3); }
@media (max-width: 1024px){ .ptwc-kpistrip.ptwc-kpi-cards { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px){ .ptwc-kpistrip.ptwc-kpi-cards { grid-template-columns: repeat(2,1fr); } }

/* Hero: drop the heavy red bar, soften into a calm Apple surface */
.ptwc-hero {
  border-radius: 22px; border: 1px solid var(--m-line-2); box-shadow: var(--sh);
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(99,102,241,.05), transparent 50%),
    var(--m-surface);
  padding: 26px 28px;
}
.ptwc-hero::before { display: none; }
.ptwc-hero .eyebrow { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.ptwc-hero-score .num { font-size: 58px; letter-spacing: -.04em; }
.ptwc-hero-class { font-weight: 600; letter-spacing: .02em; }
.ptwc-hero-programs { gap: 12px 26px; margin-top: 18px; }
.ptwc-hero-coverage { font-size: 11.5px; }

/* Sections: align to the new card language */
.ptwc-section { border-radius: 20px; border-color: var(--m-line-2); }
.ptwc-section.tier-primary { box-shadow: var(--sh); }
.ptwc-section-title { font-weight: 650; }

/* Pipeline: lighter, rounder */
.ptwc-pipeline { gap: 8px; }
.ptwc-pl-stage { border-radius: 14px; }

/* Recent investigations table: airier rows */
#tbl-cases thead th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--m-text-3); }
#tbl-cases td { padding-top: 12px; padding-bottom: 12px; }

/* ==================================================================
   ELITE BANK THEME — Mercantil Red / White / Black
   Refined, institutional, restrained red as the signature accent.
   Subtle engraved textures, high-grade sans typography. (override layer)
   ================================================================== */
:root {
  --m-bg:        #F6F5F3;            /* warm institutional ivory */
  --m-surface:   #FFFFFF;
  --m-elevated:  rgba(255,255,255,.88);
  --m-text:      #0C0C0E;            /* near-black ink */
  --m-text-2:    #545458;
  --m-text-3:    #9A9A9E;
  --m-line:      #E4E2DD;            /* warm hairline */
  --m-line-2:    #EDEBE6;
  --m-hover:     rgba(12,12,14,.04);
  --m-primary:   #C8102E;            /* refined Mercantil red */
  --m-primary-d: #A20D25;
  --m-ink:       #0C0C0E;
  --m-tint:      rgba(200,16,46,.06);
  --r-sm: 9px; --r: 12px; --r-lg: 14px; --r-xl: 18px;
  --sh:    0 1px 2px rgba(12,12,14,.05);
  --sh-md: 0 6px 20px rgba(12,12,14,.08);
  --sh-pop:0 18px 44px rgba(12,12,14,.14);
}
body, .ptwc-app { background: var(--m-bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Refined typographic discipline */
.ptwc-page-title, .ptwc-h1 { font-weight: 700; letter-spacing: -.025em; color: var(--m-text); }
.ptwc-micro-label, .ptwc-eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 10.5px; font-weight: 600; color: var(--m-text-3);
}
.ptwc-section-title, .wi-panel-title, .stl-panel-t { font-weight: 650; letter-spacing: -.01em; }

/* Engraved "security paper" texture — barely-there, elegant */
.ptwc-header, .ptwc-hero {
  background-image:
    repeating-linear-gradient(135deg, rgba(12,12,14,.014) 0 1px, transparent 1px 8px);
}
.ptwc-header { background-color: var(--m-elevated); }
.ptwc-hero {
  background-color: var(--m-surface);
  background-image:
    repeating-linear-gradient(135deg, rgba(12,12,14,.012) 0 1px, transparent 1px 9px),
    radial-gradient(130% 120% at 100% 0%, rgba(200,16,46,.045), transparent 52%);
  border: 1px solid var(--m-line); border-radius: 16px;
}
/* refined thin red rule reinstated on the hero */
.ptwc-hero::before {
  display: block; content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--m-primary), var(--m-primary-d));
}

/* Red as the signature accent — primary actions back to brand red */
.btn.ptwc-btn-primary, .ptwc-btn-primary, .btn-primary {
  background: var(--m-primary); border: 1px solid var(--m-primary); color: #fff;
}
.btn.ptwc-btn-primary:hover, .ptwc-btn-primary:hover, .btn-primary:hover { background: var(--m-primary-d); border-color: var(--m-primary-d); }
.ptwc-btn-dark { background: var(--m-ink); border-color: var(--m-ink); }   /* black stays secondary */

/* Active nav: white pill + refined red rule (institutional precision) */
.ptwc-side-link.active { box-shadow: 0 1px 2px rgba(12,12,14,.06); }
.ptwc-side-link.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 0 3px 3px 0; background: var(--m-primary);
}
.ptwc-side-link.active svg { color: var(--m-primary); }

/* Cards: crisper, institutional — hairline + minimal shadow */
.ptwc-card, .ptwc-section, .wi-panel, .stl-panel, .stl-kpi, .demo-case-card,
.ptwc-kpistrip.ptwc-kpi-cards .c { border-radius: 14px; border-color: var(--m-line); }

/* KPI cards: engraved red accent on the figure */
.ptwc-kpistrip.ptwc-kpi-cards .v { color: var(--m-text); }
.ptwc-kpistrip.ptwc-kpi-cards .c { position: relative; }
.ptwc-kpistrip.ptwc-kpi-cards .c::after {
  content: ''; position: absolute; left: 16px; bottom: 12px; width: 22px; height: 2px;
  background: var(--m-primary); opacity: .85; border-radius: 2px;
}

/* Copilot: drop the consumer indigo→pink; refined black badge, red whisper */
.wi-copilot {
  background:
    repeating-linear-gradient(135deg, rgba(12,12,14,.012) 0 1px, transparent 1px 9px),
    radial-gradient(120% 130% at 0% 0%, rgba(200,16,46,.05), transparent 55%),
    var(--m-surface);
}
.wi-copilot-badge { background: var(--m-ink); color: #fff; }

/* Avatar / dark accents pick up true ink */
.ptwc-avatar { background: var(--m-ink); }
.ptwc-lang a.active { background: var(--m-ink); }

/* Logo: keep the lion crisp black on the ivory rail */
.ptwc-sidebar .logo-full, .ptwc-sidebar .logo-mark { filter: brightness(0); opacity: .92; }

/* ==================================================================
   RESPONSIVE HARDENING — phone / tablet / desktop
   ================================================================== */
/* Tablet */
@media (max-width: 1024px) {
  .ptwc-content { padding: 18px 16px; }
  .ptwc-page-title { font-size: 25px; }
  .ptwc-hero { grid-template-columns: 1fr; }
  .ptwc-hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--m-line-2); padding-top: 16px; }
  .row.g-3 > [class^="col-"], .row.g-3 > [class*=" col-"] { flex: 0 0 100%; max-width: 100%; }
}

/* Phone */
@media (max-width: 768px) {
  .ptwc-header { padding: 0 12px; gap: 8px; }
  .ptwc-search-wrap { max-width: none; flex: 1; }
  .ptwc-kbd { display: none; }
  .ptwc-quick span, .ptwc-quick { font-size: 12px; }
  .ptwc-profile .ptwc-profile-name, .ptwc-profile .ptwc-profile-role { display: none; }
  .ptwc-page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ptwc-page-actions { width: 100%; }
  .ptwc-page-actions .btn { width: 100%; justify-content: center; }
  .ptwc-page-title { font-size: 22px; }
  .ptwc-hero { padding: 18px 16px; }
  .ptwc-hero-score .num { font-size: 44px; }
  .ptwc-hero-programs { gap: 10px 18px; }
  /* wide data tables scroll horizontally instead of breaking layout */
  .table-responsive, .stl-panel, .wi-recent { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .stl-table, #tbl-cases, .wi-table { min-width: 560px; }
  .stl-detail, .wi-result-head, .wi-grid, .stl-grid { grid-template-columns: 1fr; }
  .stl-filters { flex-wrap: wrap; }
  .stl-build-top { flex-direction: column; align-items: stretch; }
  .stl-act-btns .btn { flex: 1 1 auto; }
  .kanban { grid-auto-columns: 86%; }
  .ihub-tabs { flex-wrap: wrap; }
}

/* Small phone */
@media (max-width: 480px) {
  .ptwc-content { padding: 14px 12px; }
  .ptwc-page-title { font-size: 20px; }
  .ptwc-hero-score .num { font-size: 38px; }
  .stl-kpis, .ptwc-kpistrip.ptwc-kpi-cards { grid-template-columns: 1fr 1fr; }
  .ptwc-dl > div, .stl-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .wi-recommend-val { font-size: 19px; }
}

/* Landscape phones / very short viewports: keep header usable */
@media (max-height: 480px) and (max-width: 900px) {
  .ptwc-sidebar { padding-top: 8px; }
}

/* Never let the active-nav red rule clip on the icon rail */
@media (max-width: 860px) {
  .ptwc-side-link.active::before { left: -8px; height: 14px; }
}

/* ==================================================================
   ELITE BANK — high-grade typography (Geist) + presence
   ================================================================== */
:root { --font-base: 'Geist Variable', 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
body, .ptwc-app, button, input, select, textarea,
.btn, .form-control, .form-select, .ptwc-search,
.ptwc-side-link, .ptwc-side-btn, .ptwc-page-title, .ptwc-h1,
.ptwc-section-title, .wi-panel-title, .stl-panel-t, .ptwc-hero .eyebrow,
.kanban-nick, .wi-copilot-text {
  font-family: var(--font-base);
}
/* Display weight & optical tracking for that institutional gravitas */
.ptwc-page-title, .ptwc-h1 { font-weight: 700; letter-spacing: -.028em; }
.ptwc-section-title { letter-spacing: -.012em; }
body { letter-spacing: -.006em; }

/* Slightly more present engraved texture (still restrained) */
.ptwc-hero {
  background-image:
    repeating-linear-gradient(135deg, rgba(12,12,14,.020) 0 1px, transparent 1px 9px),
    radial-gradient(130% 120% at 100% 0%, rgba(200,16,46,.05), transparent 52%);
}
.ptwc-header {
  background-image: repeating-linear-gradient(135deg, rgba(12,12,14,.018) 0 1px, transparent 1px 8px);
  border-bottom: 1px solid var(--m-line);
}

/* ==================================================================
   GLOBAL RISK OPERATIONS CENTER (.roc) — dark intelligence console
   Palantir / Bloomberg / NATO. Scoped to the dashboard only.
   ================================================================== */
.ptwc-content:has(.roc) { padding: 0; }
.roc {
  --roc-bg:#0A0E14; --roc-panel:#10151E; --roc-seam:#1B2330;
  --roc-tx:#E6EAF0; --roc-dim:#8A94A6; --roc-faint:#5A6376;
  --roc-red:#FF2E3F; --roc-amber:#F5A623; --roc-green:#18C28A;
  --roc-mono: ui-monospace,'SF Mono',Menlo,'Cascadia Mono',monospace;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255,46,63,.06), transparent 60%),
    var(--roc-bg);
  color: var(--roc-tx); min-height: calc(100vh - var(--header-h));
  display: flex; flex-direction: column;
  font-feature-settings: 'tnum' 1;
}
.roc a { color: inherit; }

/* Threat status bar */
.roc-bar {
  display: flex; align-items: center; gap: 28px; padding: 16px 22px;
  border-bottom: 1px solid var(--roc-seam);
  background: linear-gradient(180deg, #0D131C, #0A0E14);
}
.roc-threat { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 10px; border: 1px solid; }
.roc-threat-l { font: 600 10px/1 var(--roc-mono); letter-spacing: .16em; color: var(--roc-dim); }
.roc-threat-v { font: 800 16px/1 var(--roc-mono); letter-spacing: .08em; }
.roc-threat.t-crit  { border-color: rgba(255,46,63,.5);  background: rgba(255,46,63,.08); }
.roc-threat.t-crit .roc-threat-v { color: var(--roc-red); }
.roc-threat.t-elev  { border-color: rgba(255,122,26,.5); background: rgba(255,122,26,.08); }
.roc-threat.t-elev .roc-threat-v { color: #FF7A1A; }
.roc-threat.t-guard { border-color: rgba(245,166,35,.5); background: rgba(245,166,35,.08); }
.roc-threat.t-guard .roc-threat-v { color: var(--roc-amber); }
.roc-threat.t-stable{ border-color: rgba(24,194,138,.5); background: rgba(24,194,138,.08); }
.roc-threat.t-stable .roc-threat-v { color: var(--roc-green); }
.roc-pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; color: var(--roc-red); box-shadow: 0 0 0 0 rgba(255,46,63,.6); animation: rocPulse 1.8s infinite; }
.roc-threat.t-stable .roc-pulse { color: var(--roc-green); }
@keyframes rocPulse { 0%{box-shadow:0 0 0 0 rgba(255,46,63,.55)} 70%{box-shadow:0 0 0 7px rgba(255,46,63,0)} 100%{box-shadow:0 0 0 0 rgba(255,46,63,0)} }
.roc-metrics { display: flex; gap: 26px; flex: 1; }
.roc-m { display: flex; flex-direction: column; gap: 4px; }
.roc-m .k { font: 600 9.5px/1 var(--roc-mono); letter-spacing: .12em; color: var(--roc-faint); }
.roc-m .v { font: 600 20px/1 var(--roc-mono); color: var(--roc-tx); letter-spacing: -.01em; }
.roc-m .v small { font-size: 11px; color: var(--roc-faint); }
.roc-m .v.red { color: var(--roc-red); }
.roc-id { text-align: right; }
.roc-id-t { font: 700 12px/1.2 var(--roc-mono); color: var(--roc-tx); letter-spacing: .06em; }
.roc-id-s { font: 500 9.5px/1.4 var(--roc-mono); color: var(--roc-faint); letter-spacing: .08em; margin-top: 3px; }

/* Tiled grid */
.roc-grid {
  flex: 1; display: grid; grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: min-content; gap: 1px; background: var(--roc-seam);
  border-top: 1px solid var(--roc-seam);
}
.roc-panel { background: var(--roc-panel); display: flex; flex-direction: column; min-width: 0; }
.roc-graph     { grid-column: span 8; }
.roc-copilot   { grid-column: span 4; grid-row: span 2; }
.roc-map       { grid-column: span 4; }
.roc-situation { grid-column: span 4; }
.roc-feed      { grid-column: span 12; }

.roc-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--roc-seam); }
.roc-title { font: 700 11px/1 var(--roc-mono); letter-spacing: .14em; color: var(--roc-tx); }
.roc-dim { font: 500 10px/1 var(--roc-mono); letter-spacing: .08em; color: var(--roc-faint); }
.roc-link { font: 600 10px/1 var(--roc-mono); letter-spacing: .1em; color: var(--roc-dim); }
.roc-link:hover { color: var(--roc-red); }
.roc-badge { font: 700 9px/1 var(--roc-mono); letter-spacing: .12em; color: var(--roc-green); border: 1px solid rgba(24,194,138,.4); border-radius: 5px; padding: 4px 7px; }
.roc-live { font: 700 9.5px/1 var(--roc-mono); letter-spacing: .1em; color: var(--roc-red); }

/* Graph panel */
.roc-graph-body { flex: 1; padding: 8px; min-height: 280px; display: flex; }
.roc-graph-body svg { width: 100%; height: 100%; }
.roc-foot { display: flex; gap: 20px; padding: 10px 16px; border-top: 1px solid var(--roc-seam); font: 500 10.5px/1 var(--roc-mono); color: var(--roc-dim); }
.roc-foot b { color: var(--roc-tx); }

/* Copilot */
.roc-copilot-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.roc-rec { border: 1px solid var(--roc-seam); border-left-width: 3px; border-radius: 8px; padding: 12px 13px; background: #0D121A; }
.roc-rec.s-crit { border-left-color: var(--roc-red); }
.roc-rec.s-high { border-left-color: #FF7A1A; }
.roc-rec.s-warn { border-left-color: var(--roc-amber); }
.roc-rec.s-ok   { border-left-color: var(--roc-green); }
.roc-rec-t { font: 700 11px/1.3 var(--roc-mono); letter-spacing: .04em; color: var(--roc-tx); }
.roc-rec-b { font-size: 12.5px; line-height: 1.55; color: var(--roc-dim); margin: 7px 0 9px; }
.roc-rec-cta { font: 600 10.5px/1 var(--roc-mono); letter-spacing: .06em; color: var(--roc-red); }
.roc-rec-cta:hover { color: #fff; }

/* Geospatial */
.roc-map-body { flex: 1; padding: 8px; display: flex; min-height: 280px; }
.roc-map-body svg { width: 100%; height: 100%; }

/* Situation room — decision cards */
.roc-decks { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 360px; }
.roc-deck { border: 1px solid var(--roc-seam); border-radius: 8px; padding: 12px; background: #0D121A; }
.roc-deck.d-crit { border-color: rgba(255,46,63,.35); box-shadow: inset 2px 0 0 var(--roc-red); }
.roc-deck.d-high { box-shadow: inset 2px 0 0 #FF7A1A; }
.roc-deck-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.roc-deck-tag { font: 700 10px/1 var(--roc-mono); letter-spacing: .08em; color: var(--roc-tx); }
.roc-deck-st { font: 700 9px/1 var(--roc-mono); letter-spacing: .08em; padding: 3px 7px; border-radius: 5px; }
.st-blocked, .st-crit { background: rgba(255,46,63,.14); color: var(--roc-red); }
.st-warn { background: rgba(245,166,35,.14); color: var(--roc-amber); }
.st-ok { background: rgba(24,194,138,.14); color: var(--roc-green); }
.roc-deck-row { display: flex; justify-content: space-between; font: 500 11.5px/1.8 var(--roc-mono); color: var(--roc-dim); }
.roc-deck-row b { color: var(--roc-tx); }
.roc-deck-addr { font: 500 10.5px/1 var(--roc-mono); color: var(--roc-faint); margin: 7px 0; }
.roc-deck-cta { display: inline-block; font: 600 10px/1 var(--roc-mono); letter-spacing: .05em; color: var(--roc-red); margin-top: 4px; }
.roc-deck-cta:hover { color: #fff; }

/* Live investigation feed */
.roc-feed-body { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.roc-card { display: flex; align-items: stretch; gap: 0; border-bottom: 1px solid var(--roc-seam); text-decoration: none; transition: background .12s ease; }
.roc-card:hover { background: #131A24; }
.roc-card-bar { width: 3px; flex: none; }
.roc-card-main { flex: 1; padding: 11px 14px; min-width: 0; }
.roc-card-l1 { display: flex; gap: 12px; align-items: baseline; }
.roc-card-id { font: 700 11px/1 var(--roc-mono); color: var(--roc-tx); letter-spacing: .04em; }
.roc-card-ent { font-size: 12.5px; color: var(--roc-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roc-card-l2 { font: 500 10px/1 var(--roc-mono); letter-spacing: .06em; color: var(--roc-faint); margin-top: 5px; }
.roc-card-r { display: flex; align-items: center; gap: 18px; padding: 11px 16px; }
.roc-card-amt { font: 600 13px/1 var(--roc-mono); color: var(--roc-tx); }
.roc-card-risk { font: 700 16px/1 var(--roc-mono); min-width: 30px; text-align: right; }
.roc-card-st { font: 600 9px/1 var(--roc-mono); letter-spacing: .08em; color: var(--roc-dim); width: 92px; text-align: right; }
.roc-empty { padding: 26px; text-align: center; color: var(--roc-faint); font: 500 12px/1 var(--roc-mono); letter-spacing: .06em; }

/* Responsive */
@media (max-width: 1100px) {
  .roc-graph, .roc-copilot, .roc-map, .roc-situation, .roc-feed { grid-column: span 12; grid-row: auto; }
}
@media (max-width: 768px) {
  .roc-bar { flex-direction: column; align-items: flex-start; gap: 14px; }
  .roc-metrics { flex-wrap: wrap; gap: 16px 22px; }
  .roc-id { text-align: left; }
  .roc-card-r { gap: 10px; padding: 11px 12px; }
  .roc-card-st { display: none; }
}
@media (prefers-reduced-motion: reduce) { .roc-pulse { animation: none; } }
