/* ── Design tokens — NUNKI Executive Red ───────────────────────────────────── */
:root {
  /* Executive Red — disciplined, precision brand identity */
  --red-950: #450a0a;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --red-050: #fef2f2;

  /* Navy foundation */
  --navy-980: #030910;
  --navy-950: #060e18;
  --navy-900: #0a1628;
  --navy-800: #0f2238;
  --navy-700: #162d4a;
  --navy-600: #1e3d5e;
  --navy-500: #2a5070;

  /* Emerald — used for positive/healthy signals only */
  --em-700: #0a5a3c;
  --em-600: #0d6e4c;
  --em-500: #178a60;
  --em-200: #c5e8d9;
  --em-100: #e6f4ee;
  --em-050: #f0f8f4;

  /* Champagne accent — premium secondary */
  --ch-600: #9e7434;
  --ch-500: #b8924a;
  --ch-400: #c9a85c;
  --ch-100: #f5edd8;
  --ch-050: #fdf8ee;

  /* Neutral */
  --n-000: #ffffff;
  --n-050: #f3f5f4;
  --n-100: #eaedeb;
  --n-200: #dde2df;
  --n-300: #c4cdc8;
  --n-400: #9aaba4;
  --n-500: #6a7c75;
  --n-600: #4a5e57;
  --n-700: #2f3e39;
  --n-800: #1d2d28;
  --n-900: #0f1d19;

  /* Semantic */
  --c-critical: #c23b3b;
  --c-critical-bg: #fbeaea;
  --c-critical-bd: #f0c5c5;
  --c-high: #c97a10;
  --c-high-bg: #fef4d8;
  --c-high-bd: #f0d9a0;
  --c-medium: #0d6e4c;
  --c-medium-bg: #e6f4ee;
  --c-medium-bd: #b5deca;

  /* NUNKI void — inner fill for annular avatar nodes; override per theme */
  --nunki-void: white;

  /* Typography */
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Fira Code', monospace;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-card: 0 1px 3px #0a192808, 0 4px 12px #0a192806;
  --shadow-panel: 0 2px 8px #0a192808, 0 8px 24px #0a192806;
  --shadow-dialog: 0 20px 60px #06101844, 0 4px 16px #06101822;
  --shadow-tooltip: 0 4px 16px #0a192826;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
  --t-slow: 320ms ease;
}

/* ── Reset & base ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--n-800);
  background: var(--n-050);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
button {
  font: inherit;
  cursor: pointer;
}
svg {
  display: block;
  flex-shrink: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Reduced motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════════
   VIEW MANAGEMENT — CSP-safe, class-based
══════════════════════════════════════════════════════════════════════════════ */

/* Default: hide all views, show landing */
#landing {
  display: none;
}
#onboarding {
  display: none;
}
.shell {
  display: none;
}
.nav-backdrop {
  display: none;
}

body.view-landing #landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.view-onboarding #onboarding {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.view-app .shell {
  display: grid;
}
body.menu-open .nav-backdrop {
  display: block;
}

/* ══════════════════════════════════════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════════════════════════════════════ */
#landing {
  background: #fff;
  color: var(--n-800);
  flex-direction: column;
}

/* Landing nav — light */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid var(--n-200);
  flex-wrap: wrap;
  gap: 12px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.landing-brand-avatar {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.landing-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--n-800);
  letter-spacing: 0.3px;
}
.landing-brand-name strong {
  color: #dc2626;
}

/* Language selector — light */
.lang-selector {
  display: flex;
  gap: 4px;
  background: var(--n-100);
  border: 1px solid var(--n-200);
  border-radius: var(--r-full);
  padding: 3px;
}
.lang-btn {
  padding: 5px 12px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--n-500);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition:
    background var(--t-fast),
    color var(--t-fast);
}
.lang-btn:hover {
  color: var(--n-800);
}
.lang-btn.active {
  background: var(--red-700);
  color: #fff;
}
.lang-btn:focus-visible {
  outline: 2px solid var(--red-600);
  outline-offset: 2px;
  border-radius: var(--r-full);
}

.landing-demo-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--n-600);
  border: 1px solid var(--n-300);
  padding: 4px 10px;
  border-radius: var(--r-full);
}

/* Landing hero — full-bleed port image, dark overlay via ::before */
.landing-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
  padding: 80px 64px 60px;
  background-color: var(--n-800);
  background-image: url('/assets/nunki-hero-port.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #060e18ec 0%, #0a1628c0 100%);
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
}

.landing-tagline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.landing-tagline-line {
  font: 700 52px/1 var(--font-serif);
  display: block;
}
.landing-tagline-line.red {
  color: var(--red-500);
}
.landing-tagline-line.white {
  color: #fff;
}
.landing-tagline-line.dim {
  color: rgba(255, 255, 255, 0.55);
}

.landing-sub {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  max-width: 480px;
}
.landing-sub-demo {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--ch-400);
  text-transform: uppercase;
}

.landing-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  border: 0;
  transition:
    background var(--t-fast),
    transform var(--t-fast),
    opacity var(--t-fast),
    border-color var(--t-fast),
    color var(--t-fast);
  white-space: nowrap;
}
.landing-btn:active {
  transform: scale(0.98);
}
.landing-btn:focus-visible {
  outline: 2px solid var(--red-500);
  outline-offset: 3px;
}

.landing-btn--primary {
  background: var(--red-700);
  color: #fff;
}
.landing-btn--primary:hover {
  background: var(--red-800);
}

.landing-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.landing-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* Decorative graph — hidden in new hero design */
.landing-graph-deco {
  display: none;
}

/* Landing footer — light */
.landing-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 32px;
  border-top: 1px solid var(--n-200);
  font-size: 10px;
  color: var(--n-400);
  flex-wrap: wrap;
  gap: 8px;
  background: #fff;
}

/* ── Landing sections ───────────────────────────────────────────────────────── */
.landing-sections {
  display: flex;
  flex-direction: column;
}

.landing-section {
  padding: 80px 64px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.landing-section--alt {
  /* Visually distinct alternate row — rendered at full width below */
}

/* Full-width alternate backgrounds */
#landing-how,
#landing-ask {
  max-width: unset;
  background: var(--n-050);
  padding: 80px 0;
}
#landing-how > *,
#landing-ask > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 64px;
  padding-right: 64px;
}
#landing-how .section-eyebrow,
#landing-how .section-title,
#landing-ask .section-eyebrow,
#landing-ask .section-title {
  max-width: 1200px;
  padding-left: 64px;
  padding-right: 64px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}
#landing-how .how-steps,
#landing-ask .ask-nunki-block {
  max-width: 1200px;
  padding-left: 64px;
  padding-right: 64px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.section-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-700);
  margin-bottom: 12px;
  display: block;
}
.section-title {
  font: 700 36px/1.15 var(--font-serif);
  color: var(--n-800);
  margin-bottom: 16px;
}
.section-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--n-600);
  max-width: 600px;
}

/* Fragment grid */
.fragment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}
.fragment-item {
  background: var(--n-050);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 16px;
  font-size: 12px;
  color: var(--n-600);
  line-height: 1.5;
}
.fragment-item strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--n-800);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

/* How steps */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
  box-sizing: border-box;
}
.how-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.how-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--red-700);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.how-step-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--n-800);
}
.how-step-desc {
  font-size: 12px;
  color: var(--n-500);
  line-height: 1.55;
}

/* Deliverables grid */
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.del-item {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.del-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--n-800);
  margin-bottom: 5px;
}
.del-item-desc {
  font-size: 11px;
  color: var(--n-500);
  line-height: 1.5;
}
.del-item--dev {
  background: var(--n-050);
  border-style: dashed;
  box-shadow: none;
}

/* Ask NUNKI block */
.ask-nunki-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 24px;
  box-sizing: border-box;
}
.ask-nunki-visual {
  background: var(--n-800);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ask-mock-q {
  background: var(--red-050);
  color: var(--red-800);
  border: 1px solid var(--red-100);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12px;
  align-self: flex-end;
  max-width: 85%;
}
.ask-mock-a {
  background: var(--n-700);
  color: var(--n-100);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 12px;
  max-width: 90%;
  line-height: 1.5;
}

/* Trust highlight */
.landing-trust-highlight {
  background: var(--n-900);
  padding: 80px 64px;
}
.landing-trust-highlight-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.landing-trust-highlight .section-eyebrow {
  color: var(--red-500);
}
.landing-trust-highlight .section-title {
  color: var(--n-100);
}
.trust-attrs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.trust-attr {
  text-align: center;
}
.trust-attr-value {
  font: 700 48px/1 var(--font-serif);
  color: var(--red-500);
  display: block;
}
.trust-attr-label {
  font-size: 13px;
  color: #7a9a8e;
  margin-top: 8px;
  display: block;
}

/* Audiences */
.audiences-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.audience-card {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  background: var(--n-000);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-base);
}
.audience-card:hover {
  box-shadow: var(--shadow-panel);
}
.audience-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}
.audience-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--n-800);
  margin-bottom: 8px;
}
.audience-desc {
  font-size: 12px;
  color: var(--n-500);
  line-height: 1.6;
}

/* Final CTA */
.landing-final-cta {
  background: var(--red-800);
  padding: 80px 64px;
  text-align: center;
}
.landing-final-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}
.landing-final-cta .section-eyebrow {
  color: rgba(255, 255, 255, 0.65);
}
.landing-final-cta .section-title {
  color: #fff;
  margin-bottom: 12px;
}
.landing-final-cta .section-body {
  color: rgba(255, 255, 255, 0.72);
  max-width: 100%;
  margin: 0 auto 24px;
  display: block;
}
.landing-final-cta-btn {
  font-size: 15px;
  padding: 14px 32px;
}
.landing-final-cta-note {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 16px;
  letter-spacing: 0.5px;
  display: block;
}

/* ══════════════════════════════════════════════════════════════════════════════
   ONBOARDING
══════════════════════════════════════════════════════════════════════════════ */
#onboarding {
  background: var(--n-050);
  color: var(--n-800);
}

.onboarding-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px 40px;
  width: 100%;
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 24px;
  background: var(--n-050);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 10px;
}
.ob-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: center;
  margin: 0;
}
.ob-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.ob-brand-wordmark {
  font-size: 16px;
  font-weight: 600;
  color: var(--n-800);
  letter-spacing: 0.3px;
}
.ob-brand-wordmark strong {
  color: #dc2626;
}
.ob-brand-context {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-700, #b91c1c);
}
.ob-back-to-landing {
  margin-left: auto;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--red-700);
  background: var(--red-700);
  color: var(--n-000);
  white-space: nowrap;
}
.ob-back-to-landing:hover {
  border-color: var(--red-800);
  background: var(--red-800);
  color: var(--n-000);
}
/* Intelligence Command Center */
.cc-panel {
  margin-bottom: 22px;
}
.cc-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--n-600, #4b5b52);
  margin: 16px 0 8px;
}
.cc-fin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.cc-fin-card {
  background: var(--n-050, #f6f8f7);
  border: 1px solid var(--n-200, #dfe6e2);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cc-fin-label {
  font-size: 11px;
  color: var(--n-600, #4b5b52);
}
.cc-fin-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--n-800, #1f2a24);
}
.cc-objectives {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cc-obj-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--n-200, #dfe6e2);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--n-800, #1f2a24);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.cc-obj-shortcut:hover {
  border-color: var(--red-700, #b91c1c);
}

.ob-form-group-header {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-700, #b91c1c);
  border-bottom: 1px solid var(--n-200);
  padding-bottom: 6px;
  margin: 4px 0 2px;
}

/* Progress */
.ob-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}
.ob-progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--n-100);
  color: var(--n-400);
  border: 2px solid var(--n-200);
  transition:
    background var(--t-base),
    color var(--t-base),
    border-color var(--t-base);
}
.ob-progress-dot.is-active {
  background: var(--red-700);
  color: #fff;
  border-color: var(--red-700);
}
.ob-progress-dot.is-done {
  background: var(--em-100);
  color: var(--em-600);
  border-color: var(--em-200);
}
.ob-progress-line {
  flex: 1;
  height: 2px;
  background: var(--n-200);
  border-radius: 2px;
}

/* Steps */
.onboarding-step {
  display: none;
  flex-direction: column;
  gap: 20px;
}
.onboarding-step.is-active {
  display: flex;
}

.ob-step-title {
  font: 600 24px var(--font-serif);
  color: var(--n-800);
}
.ob-step-sub {
  font-size: 13px;
  color: var(--n-500);
}

.ob-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ob-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ob-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--n-600);
  text-transform: uppercase;
}
.ob-input,
.ob-select {
  padding: 10px 14px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-md);
  font: inherit;
  font-size: 14px;
  background: var(--n-000);
  color: var(--n-800);
  transition: border-color var(--t-fast);
  width: 100%;
}
.ob-input:focus,
.ob-select:focus {
  outline: none;
  border-color: var(--red-700);
}
.ob-hint {
  font-size: 10px;
  color: var(--n-400);
}

/* Company type options */
.ob-type-field {
  border: 0;
  padding: 0;
}
.ob-type-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ob-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-md);
  cursor: pointer;
  transition:
    border-color var(--t-fast),
    background var(--t-fast);
  text-align: center;
}
.ob-type-option:hover {
  border-color: var(--red-700);
  background: var(--red-050);
}
.ob-type-option input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ob-type-option:has(input:checked) {
  border-color: var(--red-700);
  background: var(--red-050);
}
.ob-type-icon {
  font-size: 20px;
}
.ob-type-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--n-700);
}

/* Objectives */
.ob-objectives {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ob-obj-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-md);
  cursor: pointer;
  transition:
    border-color var(--t-fast),
    background var(--t-fast);
  font-size: 12px;
  color: var(--n-700);
}
.ob-obj-option:hover {
  border-color: var(--red-700);
  background: var(--red-050);
}
.ob-obj-option input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ob-obj-option:has(input:checked) {
  border-color: var(--red-700);
  background: var(--red-050);
}
.ob-obj-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Summary */
.ob-summary {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.ob-summary p {
  color: var(--n-700);
}
.ob-summary b {
  color: var(--n-800);
}
.ob-synthetic-note {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--ch-600);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Actions */
.ob-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.ob-actions--two {
  justify-content: space-between;
}

.ob-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  border: 0;
  transition:
    background var(--t-fast),
    color var(--t-fast),
    transform var(--t-fast);
}
.ob-btn:active {
  transform: scale(0.98);
}
.ob-btn:focus-visible {
  outline: 2px solid var(--red-600);
  outline-offset: 2px;
}

.ob-btn--primary {
  background: var(--red-700);
  color: #fff;
}
.ob-btn--primary:hover {
  background: var(--red-800);
}
.ob-btn--ghost {
  background: var(--n-100);
  color: var(--n-600);
}
.ob-btn--ghost:hover {
  background: var(--n-200);
  color: var(--n-800);
}
.ob-btn--enter {
  background: var(--n-800);
  color: var(--n-100);
}
.ob-btn--enter:hover {
  background: var(--n-700);
}

.ob-disclaimer {
  margin-top: 24px;
  font-size: 10px;
  color: var(--n-400);
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════════════
   MAIN APP SHELL
══════════════════════════════════════════════════════════════════════════════ */
.shell {
  min-height: 100vh;
  grid-template-columns: 240px 1fr;
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--n-900);
  color: var(--n-200);
  padding: 24px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 40;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--n-600) transparent;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 22px;
  text-decoration: none;
  color: var(--n-050);
  border-bottom: 1px solid var(--n-700);
  margin-bottom: 8px;
  transition: opacity var(--t-fast);
}
.brand:hover {
  opacity: 0.85;
}
.brand:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.brandmark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.brandmark img {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.brand-label strong {
  color: #dc2626;
  font-weight: 700;
}
.brand-label small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--n-500);
  margin-top: 2px;
}

/* Nav */
#nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  overflow-y: auto;
}

/* Nav group labels — high contrast vs dark sidebar (≥4.5:1) */
/* Uses h3 element for proper heading semantics in the landmark nav */
h3.nav-group-label,
.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #c4d4cc;
  padding: 14px 10px 5px;
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
  margin: 0;
}
h3.nav-group-label:first-child,
.nav-group-label:first-child {
  padding-top: 4px;
}

/* Nav items */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: #6a8a80;
  text-align: left;
  font-size: 12.5px;
  transition:
    color var(--t-fast),
    background var(--t-fast);
}
.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--n-700);
  color: var(--n-100);
}
.nav-item:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: -2px;
}
.nav-item.active {
  background: var(--n-700);
  color: var(--n-050);
  box-shadow: inset 3px 0 0 var(--red-700);
}
.nav-item.active svg {
  color: #dc2626;
}
.nav-item-avatar {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Tooltip */
.nav-tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--n-800);
  color: var(--n-100);
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 11px;
  border-radius: var(--r-md);
  white-space: normal;
  max-width: 220px;
  pointer-events: none;
  opacity: 0;
  z-index: 60;
  box-shadow: var(--shadow-tooltip);
  transition: opacity var(--t-fast);
}
.nav-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: var(--n-800);
}
.nav-item:hover .nav-tooltip,
.nav-item:focus-visible .nav-tooltip {
  opacity: 1;
}

/* Sidebar footer */
.sidebar-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 1px solid var(--n-700);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--n-300);
  font-size: 12px;
  font-weight: 600;
  transition:
    border-color var(--t-fast),
    background var(--t-fast),
    color var(--t-fast);
}
.sidebar-signout:hover {
  border-color: var(--red-700);
  background: var(--red-950);
  color: var(--n-000);
}
.sidebar-signout:focus-visible {
  outline: 2px solid var(--red-600);
  outline-offset: 2px;
}
.sidebar-footer {
  border-top: 1px solid var(--n-700);
  padding-top: 16px;
  font-size: 11px;
  color: var(--n-400);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.sidebar-footer small {
  display: block;
  width: 100%;
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--n-500);
  margin-top: 2px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fd47e;
  box-shadow: 0 0 0 2px #0a192844;
}

/* Mobile backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 29, 25, 0.55);
  z-index: 30;
  backdrop-filter: blur(2px);
}

/* ── Main area ──────────────────────────────────────────────────────────────── */
main {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  background: var(--n-000);
  border-bottom: 1px solid var(--n-200);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 14px;
  box-shadow: 0 1px 4px #0a192808;
}

#menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--n-600);
  transition:
    background var(--t-fast),
    color var(--t-fast);
  flex-shrink: 0;
}
#menu:hover {
  background: var(--n-100);
  color: var(--n-800);
}
#menu:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 2px;
}

.header-title {
  flex: 1;
  min-width: 0;
}
.header-title h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 1px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--n-500);
  margin: 0;
}

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

.header-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
  background: var(--n-000);
  color: var(--n-600);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background var(--t-fast),
    color var(--t-fast),
    border-color var(--t-fast);
}
.header-btn:hover {
  background: var(--n-050);
  color: var(--n-800);
  border-color: var(--n-300);
}
.header-btn:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 2px;
}
.header-btn:disabled {
  opacity: 1;
  cursor: default;
}

/* Ask NUNKI search button — red accent */
.search-btn {
  color: var(--red-700);
  border-color: var(--red-100);
}
.search-btn:hover {
  background: var(--red-050);
  border-color: var(--red-700);
}
.ask-nunki-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ask-nunki-trigger-avatar {
  display: block;
  flex: 0 0 auto;
}
.search-btn.ask-nunki-trigger {
  padding: 5px 10px 5px 6px;
  color: var(--n-800);
  border-color: var(--n-200);
}
.search-btn.ask-nunki-trigger:hover {
  background: var(--red-050);
  border-color: var(--red-700);
}

.alerts-btn {
  position: relative;
}
.alert-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-critical);
  color: white;
  font-size: 9px;
  font-weight: 700;
}

.demo-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--ch-600);
  background: var(--ch-050);
  border: 1px solid var(--ch-100);
  padding: 6px 10px;
  border-radius: var(--r-full);
}

.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: default;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Notice bar ─────────────────────────────────────────────────────────────── */
.notice {
  background: #eaf5ee;
  border-bottom: 1px solid #c5e2ce;
  padding: 8px 32px;
  font-size: 11px;
  color: #2c5c3a;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice-icon {
  color: #3a7a50;
  flex-shrink: 0;
}
.notice strong {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Content area ───────────────────────────────────────────────────────────── */
#content {
  padding: 28px 32px 60px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* ── Welcome ────────────────────────────────────────────────────────────────── */
.welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}
.welcome-text h2 {
  font: 600 29px var(--font-serif);
  color: var(--n-800);
  margin: 5px 0 4px;
}
.welcome-text p {
  color: var(--n-500);
  font-size: 13px;
}

.ask-shortcut-btn {
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  background: var(--n-000);
  color: var(--n-800);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition:
    background var(--t-fast),
    border-color var(--t-fast),
    transform var(--t-fast);
}
.ask-shortcut-btn:hover {
  background: var(--red-050);
  border-color: var(--red-700);
}
.ask-shortcut-btn:active {
  transform: scale(0.98);
}
.ask-shortcut-btn:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 3px;
}
/* ── Metrics ────────────────────────────────────────────────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.metric-card {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 18px;
  position: relative;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-fast);
}
.metric-card:hover {
  box-shadow: var(--shadow-panel);
}
.metric-card p {
  font-size: 11px;
  color: var(--n-500);
  margin: 0 0 8px;
}
.metric-card strong {
  display: block;
  font: 600 24px var(--font-serif);
  color: var(--n-800);
  line-height: 1.1;
}
.metric-card small {
  font-size: 10px;
  color: var(--em-600);
  margin-top: 4px;
  display: block;
}
.metric-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--red-050);
  color: var(--red-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Panel ──────────────────────────────────────────────────────────────────── */
.panel {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-title h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 0;
  color: var(--n-800);
}

.badge-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--c-critical);
  background: var(--c-critical-bg);
  border: 1px solid var(--c-critical-bd);
  padding: 4px 8px;
  border-radius: var(--r-full);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Dashboard grid ─────────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

/* Attention queue */
.attention-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--n-100);
  background: transparent;
  padding: 13px 4px;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast);
  border-radius: 0;
}
.attention-item:first-child {
  border-top: 0;
}
.attention-item:hover {
  background: var(--n-050);
  border-radius: var(--r-sm);
}
.attention-item:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 1px;
  border-radius: var(--r-sm);
}
.attention-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.attention-dot.critical {
  background: var(--c-critical);
}
.attention-dot.high {
  background: var(--c-high);
}
.attention-dot.medium {
  background: var(--c-medium);
}
.attention-text {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.attention-text b {
  font-size: 12px;
  color: var(--n-800);
}
.attention-text small {
  font-size: 10px;
  color: var(--n-500);
}
.attention-severity {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--n-500);
  flex-shrink: 0;
}
.attention-arrow {
  color: var(--n-400);
  flex-shrink: 0;
}

/* Pipeline donut */
.flow-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 12px auto;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle, var(--n-000) 52%, transparent 54%),
    conic-gradient(var(--red-700) 0 75%, var(--n-100) 75%);
}
.donut strong {
  font: 600 22px var(--font-serif);
  color: var(--n-800);
}
.donut span {
  font-size: 9px;
  color: var(--n-500);
  display: block;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 10px;
  color: var(--n-600);
  justify-content: center;
  flex-wrap: wrap;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
}
.dot--green {
  background: var(--em-600);
}
.dot--amber {
  background: var(--c-high);
}
.dot--red {
  background: var(--c-critical);
}

/* ── Insight grid ───────────────────────────────────────────────────────────── */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.stat-big {
  font: 600 22px var(--font-serif);
  color: var(--n-800);
  display: block;
  margin: 8px 0 4px;
}
.muted {
  font-size: 11px;
  color: var(--n-500);
}

.route-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}
.route-node {
  font-size: 12px;
  font-weight: 600;
  color: var(--red-700);
  white-space: nowrap;
}
.route-track {
  flex: 1;
  min-width: 0;
}

/* Bar chart */
.bars {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-label {
  font-size: 10px;
  color: var(--n-500);
  width: 62px;
  flex-shrink: 0;
}
.bar-track {
  flex: 1;
  height: 6px;
  background: var(--n-100);
  border-radius: var(--r-full);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--red-700);
  border-radius: var(--r-full);
  width: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill[data-pct='80'] {
  width: 80%;
}
.bar-fill[data-pct='55'] {
  width: 55%;
}
.bar-fill[data-pct='35'] {
  width: 35%;
}
.bar-fill[data-pct='20'] {
  width: 20%;
}
.bar-val {
  font-size: 10px;
  font-weight: 600;
  color: var(--n-700);
  width: 14px;
  text-align: right;
}

/* ── Operations table ───────────────────────────────────────────────────────── */
.operations-panel {
  margin-top: 12px;
}
.link-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  color: var(--red-700);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 2px;
  transition: color var(--t-fast);
  flex-shrink: 0;
}
.link-btn:hover {
  color: var(--red-600);
}
.link-btn:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 0 4px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--n-500);
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--n-200);
  white-space: nowrap;
}
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--n-100);
  font-size: 12px;
  white-space: nowrap;
}
td:first-child {
  font-weight: 600;
  color: var(--n-700);
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr {
  transition: background var(--t-fast);
}
tbody tr:hover {
  background: var(--n-050);
}

/* Stage badges */
.stage {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 600;
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border: 1px solid var(--c-medium-bd);
}
.stage.em-transito {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}
.stage.aprovacao {
  background: var(--c-high-bg);
  color: var(--c-high);
  border-color: var(--c-high-bd);
}
.stage.compliance-bloqueado {
  background: var(--c-critical-bg);
  color: var(--c-critical);
  border-color: var(--c-critical-bd);
}
.stage.booking-confirmado {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}

/* ── Module pages ───────────────────────────────────────────────────────────── */
.module-page {
  display: grid;
  gap: 16px;
}
.module-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.module-head-text h2 {
  font: 600 26px var(--font-serif);
  margin: 5px 0 4px;
}
.module-head-text p {
  font-size: 12px;
  color: var(--n-500);
}
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--red-700);
  background: var(--red-700);
  color: var(--n-000);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  transition:
    background var(--t-fast),
    color var(--t-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.back-btn:hover {
  border-color: var(--red-800);
  background: var(--red-800);
  color: var(--n-000);
}
.back-btn:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 2px;
}

/* Module stats bar */
.module-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.module-stat {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}
.module-stat small {
  display: block;
  font-size: 10px;
  color: var(--n-500);
}
.module-stat strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 5px;
  color: var(--n-700);
}

/* Generic record list */
.record-list {
  display: grid;
}
.record-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.4fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 6px;
  border-top: 1px solid var(--n-100);
  font-size: 12px;
  transition: background var(--t-fast);
}
.record-row:hover {
  background: var(--n-050);
  border-radius: var(--r-sm);
}
.record-row:first-child {
  border-top: 0;
}
.record-first {
  display: grid;
  gap: 2px;
}
.record-first b {
  font-weight: 600;
  color: var(--n-700);
}
.record-sub {
  font-size: 10px;
  color: var(--n-400);
}
.record-version {
  font-size: 10px;
  color: var(--n-400);
  font-style: italic;
}

.panel-history {
  font-size: 11px;
  color: var(--n-500);
  background: var(--n-050);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.module-history-copy,
.provenance-copy {
  margin-top: 6px;
}
.provenance-copy {
  font-size: 11px;
  color: var(--n-500);
}

/* ── Empty state ────────────────────────────────────────────────────────────── */
.module-empty {
  text-align: center;
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  padding: 72px 24px;
}
.module-empty-icon {
  color: var(--n-300);
  margin: 0 auto 16px;
}
.module-empty h3 {
  font: 600 20px var(--font-serif);
  color: var(--n-600);
  margin-bottom: 8px;
}
.module-empty p {
  color: var(--n-500);
  max-width: 420px;
  margin: 0 auto;
  font-size: 12px;
}

/* ── Shipments module ───────────────────────────────────────────────────────── */
.shipments-hero {
  background: var(--n-800);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.shipments-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}
.shipments-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #0a162899 0%,
    #0a162833 55%,
    transparent 100%
  );
  pointer-events: none;
}
.shipments-hero-text {
  position: relative;
  z-index: 1;
  color: #e2eeea;
  padding: 20px 24px;
}
.shipments-hero-text .eyebrow {
  color: #dc2626;
}
.shipments-hero-text p {
  font-size: 13px;
  margin-top: 6px;
}
.shipment-row {
  grid-template-columns: 2fr 1.6fr 1.6fr 1fr;
}
.shipment-port {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--n-700);
}

/* ── Opportunities Intelligence ─────────────────────────────────────────────── */
.opp-cards {
  display: grid;
  gap: 14px;
}
.opp-card {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 14px;
  transition: box-shadow var(--t-base);
}
.opp-card:hover {
  box-shadow: var(--shadow-panel);
}
.opp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.opp-id {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--n-400);
  text-transform: uppercase;
}
.opp-product {
  font-size: 15px;
  font-weight: 600;
  color: var(--n-800);
  margin: 3px 0 0;
}
.opp-opportunity {
  font-size: 12px;
  color: var(--n-500);
}
.opp-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.opp-score {
  font: 600 20px var(--font-serif);
  color: var(--red-700);
}
.opp-score-label {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--n-400);
  text-transform: uppercase;
  white-space: nowrap;
}
.opp-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1px solid;
}
.opp-status.scored {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}
.opp-status.pending {
  background: var(--c-high-bg);
  color: var(--c-high);
  border-color: var(--c-high-bd);
}
.opp-status.hypothesis {
  background: var(--n-100);
  color: var(--n-600);
  border-color: var(--n-300);
}
.opp-status.active {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}
.opp-status.negotiating {
  background: var(--c-high-bg);
  color: var(--c-high);
  border-color: var(--c-high-bd);
}
.opp-status.prospect {
  background: var(--n-100);
  color: var(--n-600);
  border-color: var(--n-300);
}

.opp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  font-size: 11px;
}
.opp-field label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--n-400);
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}
.opp-field span {
  color: var(--n-700);
  line-height: 1.4;
  display: block;
}
.opp-field--full {
  grid-column: 1 / -1;
}
.opp-next-step {
  color: var(--n-700);
  font-size: 11px;
}
.opp-evidence {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.opp-evidence-tag {
  font-size: 10px;
  background: var(--n-100);
  color: var(--n-600);
  padding: 3px 8px;
  border-radius: var(--r-full);
  border: 1px solid var(--n-200);
}
.opp-rationale {
  font-size: 12px;
  color: var(--n-500);
  line-height: 1.5;
  background: var(--n-050);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  border-left: 3px solid var(--n-200);
}
.opp-sim {
  background: var(--ch-050);
  border: 1px solid var(--ch-100);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 12px;
}
.opp-sim-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--ch-600);
  margin-bottom: 5px;
}

/* DEMO tags */
.demo-tag {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--ch-600);
  background: var(--ch-050);
  border: 1px solid var(--ch-100);
  padding: 2px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
}
/* ── Version demo badge ── */
.demo-tag.version-demo {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.demo-tag--gold {
  background: var(--ch-100);
  color: var(--ch-600);
}
.demo-tag--inverse {
  background: var(--n-800);
  color: #dc2626;
  border-color: var(--red-900);
}

/* ── Trade Simulator ────────────────────────────────────────────────────────── */
.sim-panel {
  border-top: 3px solid var(--red-700);
}
.sim-scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.sim-card {
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--n-050);
}
.sim-card.conservador {
  border-color: var(--c-medium-bd);
}
.sim-card.timo {
  border-color: var(--red-100);
  border-top: 3px solid var(--red-700);
}
.sim-card.agressivo {
  border-color: var(--c-high-bd);
}
.sim-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sim-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--n-800);
}
.sim-badge {
  font-size: 8px;
  font-weight: 700;
}
.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.sim-field small {
  display: block;
  font-size: 9px;
  color: var(--n-500);
  margin-bottom: 2px;
}
.sim-field strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--n-800);
}
.sim-notes {
  font-size: 10px;
  color: var(--n-500);
  line-height: 1.45;
}

/* Trade Simulator — hierarchy layout */
.sim-economic-result {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.sim-econ-primary small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--n-500);
  margin-bottom: 3px;
}
.sim-econ-primary strong {
  display: block;
  font: 700 17px var(--font-serif);
  color: var(--n-800);
}
.sim-econ-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.sim-econ-secondary small {
  display: block;
  font-size: 9px;
  color: var(--n-500);
  margin-bottom: 2px;
}
.sim-econ-secondary strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--n-700);
}
.sim-variables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.sim-risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--n-050);
  border-radius: var(--r-sm);
  margin-bottom: 6px;
}
.sim-risk-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--n-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sim-risk-val {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.sim-risk-val.risk-baixo {
  color: var(--c-medium);
  background: var(--c-medium-bg);
}
.sim-risk-val.risk-medio {
  color: var(--c-high);
  background: var(--c-high-bg);
}
.sim-risk-val.risk-alto {
  color: var(--c-critical);
  background: var(--c-critical-bg);
}
.sim-interpretation {
  font-size: 11px;
  color: var(--n-500);
  line-height: 1.5;
  padding-top: 4px;
  border-top: 1px solid var(--n-100);
  margin-top: 6px;
}

/* Plan note (replaces demo-tag in plan tier display) */
.plan-note {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--n-500);
  background: var(--n-050);
  border: 1px solid var(--n-200);
  border-radius: var(--r-full);
  padding: 2px 8px;
}

/* Forecast vs Actual */
.fva-section {
  margin-top: 16px;
}
.fva-section .eyebrow {
  margin-bottom: 10px;
}
.fva-table-wrap {
  overflow-x: auto;
}
.fva-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.fva-table th {
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--n-500);
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--n-200);
}
.fva-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--n-100);
}
.fva-table tbody tr:last-child td {
  border-bottom: 0;
}
.fva-delta {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-full);
  border: 1px solid;
}
.fva-within {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}
.fva-over {
  background: var(--c-high-bg);
  color: var(--c-high);
  border-color: var(--c-high-bd);
}
.fva-under {
  background: var(--red-050);
  color: var(--red-700);
  border-color: var(--red-100);
}

.sim-disclaimer {
  font-size: 10px;
  color: var(--n-400);
  margin-top: 14px;
  line-height: 1.5;
}

/* ── Trust Layer ────────────────────────────────────────────────────────────── */
.trust-panel {
  border-top: 3px solid var(--red-700);
  display: grid;
  gap: 14px;
}
.trust-card {
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--n-050);
}
.trust-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.trust-entity-id {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--n-400);
  text-transform: uppercase;
}
.trust-entity-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--n-800);
  margin-top: 2px;
}
.trust-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.trust-score {
  font: 600 16px var(--font-serif);
}
.trust-score--habilitado {
  color: var(--em-600);
}
.trust-score--bloqueado {
  color: var(--c-critical);
}
.trust-score--verificado {
  color: var(--em-600);
}
.trust-status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1px solid;
}
.trust-habilitado {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}
.trust-bloqueado {
  background: var(--c-critical-bg);
  color: var(--c-critical);
  border-color: var(--c-critical-bd);
}
.trust-verificado {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}

.trust-status {
  font-size: 11px;
  font-weight: 600;
}
.trust-ok {
  color: var(--em-600);
}
.trust-pending {
  color: var(--c-high);
}
.trust-none {
  color: var(--n-500);
}

.trust-factors {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.trust-factor {
  display: grid;
  gap: 4px;
}
.trust-factor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--n-700);
}
.trust-factor-score {
  font-size: 11px;
  font-weight: 600;
  color: var(--n-800);
}
.trust-factor-score small {
  font-weight: 400;
  color: var(--n-500);
  margin-left: 5px;
}
.trust-bar-track {
  height: 5px;
  background: var(--n-200);
  border-radius: var(--r-full);
  overflow: hidden;
}
.trust-bar-fill {
  height: 100%;
  background: var(--em-600);
  border-radius: var(--r-full);
  width: 0;
  transition: width 0.5s ease;
}
/* Trust bar widths via class (no inline style) */
.trust-bar-fill.pct-100 {
  width: 100%;
}
.trust-bar-fill.pct-92 {
  width: 92%;
}
.trust-bar-fill.pct-88 {
  width: 88%;
}
.trust-bar-fill.pct-84 {
  width: 84%;
}
.trust-bar-fill.pct-80 {
  width: 80%;
}
.trust-bar-fill.pct-76 {
  width: 76%;
}
.trust-bar-fill.pct-72 {
  width: 72%;
}
.trust-bar-fill.pct-0 {
  width: 0;
  background: var(--c-critical);
}

.trust-explanation {
  font-size: 11px;
  color: var(--n-500);
  line-height: 1.5;
  background: var(--n-000);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  border-left: 3px solid var(--n-200);
  margin-bottom: 10px;
}
.trust-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--n-400);
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Buyer Intelligence ─────────────────────────────────────────────────────── */
.buyer-cards {
  display: grid;
  gap: 12px;
}
.buyer-card {
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--n-050);
  display: grid;
  gap: 10px;
  transition: box-shadow var(--t-fast);
}
.buyer-card:hover {
  box-shadow: var(--shadow-card);
}
.buyer-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.buyer-id {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--n-400);
  text-transform: uppercase;
}
.buyer-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--n-800);
  margin: 2px 0;
}
.buyer-country {
  font-size: 11px;
  color: var(--n-500);
}
.buyer-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.buyer-score {
  font: 600 15px var(--font-serif);
  color: var(--red-700);
}
.buyer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.buyer-notes {
  font-size: 11px;
  color: var(--n-500);
}

/* ── Financial ──────────────────────────────────────────────────────────────── */
/* (uses opp-grid and fva-table already defined above) */

/* ── Pricing ────────────────────────────────────────────────────────────────── */
.pricing-notice {
  background: var(--red-050);
  border: 1px solid var(--red-100);
  margin-bottom: 4px;
}
.pricing-notice .eyebrow {
  color: var(--red-700);
  margin-bottom: 6px;
}
.pricing-notice p {
  font-size: 11px;
  color: var(--red-800);
  line-height: 1.5;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pricing-card {
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  background: var(--n-000);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition:
    background var(--t-fast),
    border-color var(--t-fast),
    box-shadow var(--t-fast),
    transform var(--t-fast);
}
.pricing-card:hover {
  background: linear-gradient(145deg, var(--n-000) 0%, var(--red-050) 100%);
  border-color: var(--red-700);
  box-shadow:
    0 0 0 2px var(--red-100),
    0 14px 30px #7f1d1d24;
  transform: translateY(-6px);
}
.pricing-card:hover .pricing-card-head {
  background: #fff8f8;
  border-bottom-color: var(--red-100);
}
.pricing-card:hover .pricing-tier-name,
.pricing-card:hover .pricing-price {
  color: var(--red-700);
}
.pricing-card--featured {
  border-color: var(--red-700);
  box-shadow:
    0 0 0 2px var(--red-100),
    var(--shadow-panel);
}
.pricing-card-head {
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--n-100);
}
.pricing-tier-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--n-800);
  margin-bottom: 4px;
}
.pricing-price {
  font: 600 15px var(--font-serif);
  color: var(--red-700);
  margin: 8px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pricing-audience {
  font-size: 11px;
  color: var(--n-500);
}
.pricing-features {
  list-style: none;
  padding: 16px 20px;
  display: grid;
  gap: 10px;
}
.pricing-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--n-700);
}
.pricing-feature-status {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--r-full);
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.pricing-status--concept {
  background: var(--ch-050);
  color: var(--ch-600);
  border-color: var(--ch-100);
}
.pricing-status--coming-soon {
  background: var(--red-050);
  color: var(--red-700);
  border-color: var(--red-100);
}
.pricing-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto 16px;
}
.pricing-panel .panel-title {
  margin-bottom: 16px;
}
@media (max-width: 899px) {
  .pricing-tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── One Trade Graph panel ──────────────────────────────────────────────────── */
.otg-panel .panel-title {
  margin-bottom: 14px;
}
.otg-graph {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.otg-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  background: var(--n-050);
  transition:
    border-color var(--t-fast),
    background var(--t-fast);
  cursor: pointer;
}
.otg-node:hover {
  border-color: var(--red-700);
  background: var(--red-050);
}
.otg-node:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 2px;
}
.otg-node-count {
  font: 600 18px var(--font-serif);
  color: var(--red-700);
}
.otg-node-label {
  font-size: 10px;
  color: var(--n-600);
  font-weight: 500;
}

/* ── Product Cards ──────────────────────────────────────────────────────────── */
.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.product-card {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--t-fast),
    box-shadow var(--t-fast),
    transform var(--t-fast);
}
.product-card:hover {
  border-color: var(--red-100);
  box-shadow: var(--shadow-card-hover, 0 4px 16px #0002);
  transform: translateY(-2px);
}
.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--n-100);
  overflow: hidden;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-img-label {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
  background: #0006;
  padding: 2px 7px;
  border-radius: var(--r-full);
  text-transform: uppercase;
}
.product-img-wrap--coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    radial-gradient(circle at 50% 36%, var(--red-050), transparent 56%),
    var(--n-050);
  border-bottom: 1px solid var(--n-100);
}
.product-coming-soon-avatar {
  display: block;
}
.product-coming-soon-label {
  color: var(--n-600);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  text-align: center;
}
.product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--n-100) 0%, var(--n-200) 100%);
  font-size: 36px;
}
.product-name {
  font: 600 13px var(--font-sans);
  color: var(--n-800);
  margin: 4px 0 14px;
  padding: 0;
  text-align: center;
}
.product-card .opp-grid {
  width: 100%;
  text-align: center;
}
.product-card .opp-field {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-card .opp-field span {
  overflow-wrap: anywhere;
}

/* ── NUNKI Expeditions ──────────────────────────────────────────────────────── */
.exp-hero {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--n-800);
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.exp-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.exp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(10 22 40 / 60%) 0%,
    rgb(10 22 40 / 32%) 55%,
    rgb(10 22 40 / 10%) 100%
  );
}
.exp-hero-content {
  position: relative;
  max-width: 620px;
  margin: 20px 28px;
  padding: 18px 20px;
  color: var(--n-900);
  background: rgb(255 255 255 / 60%);
  border: 1px solid #ffffffa8;
  border-left: 4px solid var(--red-700);
  backdrop-filter: blur(4px);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  box-shadow: 0 10px 28px #0a162840;
  backdrop-filter: blur(8px);
}
.exp-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  background: #0a162888;
  border: 1px solid #dc262655;
  color: #dc2626;
  padding: 4px 10px;
  border-radius: var(--r-full);
  margin-bottom: 10px;
}
.exp-hero-content h3 {
  font: 700 24px var(--font-serif);
  color: var(--red-700);
  margin-bottom: 5px;
}
.exp-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.exp-hero-title-row h3 {
  margin-bottom: 5px;
}
.exp-hero-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: var(--r-full);
  background: rgb(255 255 255 / 42%);
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 2px 6px rgb(10 22 40 / 12%);
}
.exp-hero-content p {
  font-size: 13px;
  color: var(--n-900);
  font-weight: 600;
}

.exp-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.exp-meta-card {
  background: var(--n-000);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
}
.exp-meta-card--wide {
  grid-column: 1 / -1;
}
.exp-meta-card label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--n-400);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.exp-meta-card span {
  font-size: 12px;
  color: var(--n-700);
}

.exp-itinerary {
  display: grid;
  gap: 8px;
}
.exp-day {
  display: grid;
  grid-template-columns: 100px 140px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 6px;
  border-top: 1px solid var(--n-100);
  font-size: 12px;
}
.exp-day:first-child {
  border-top: 0;
}
.exp-day-label {
  font-weight: 700;
  color: var(--red-700);
}
.exp-day-loc {
  font-weight: 600;
  color: var(--n-700);
}
.exp-day-act {
  color: var(--n-500);
}

.exp-objectives {
  display: grid;
  gap: 8px;
}
.exp-obj {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--n-700);
  padding: 4px 0;
}
.exp-obj-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-700);
  flex-shrink: 0;
  margin-top: 4px;
}

.exp-interest-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.exp-status-copy {
  font-size: 12px;
  color: var(--n-600);
}
.exp-interest-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--red-700);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition:
    background var(--t-fast),
    transform var(--t-fast);
}
.exp-interest-btn:hover {
  background: var(--red-800);
}
.exp-interest-btn:active {
  transform: scale(0.98);
}
.exp-interest-btn:focus-visible {
  outline: 2px solid var(--red-500);
  outline-offset: 3px;
}
.exp-interest-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.exp-interest-confirm {
  display: none;
  font-size: 12px;
  color: var(--em-600);
  background: var(--em-100);
  border: 1px solid var(--em-200);
  border-radius: var(--r-md);
  padding: 10px 14px;
}
.exp-interest-confirm.is-visible {
  display: block;
}

.exp-disclaimer {
  font-size: 10px;
  color: var(--n-500);
  line-height: 1.55;
  background: var(--n-050);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  border-left: 3px solid var(--n-200);
}

/* ── Ask NUNKI dialog ───────────────────────────────────────────────────────── */
dialog {
  border: 0;
  border-radius: var(--r-xl);
  padding: 0;
  max-width: 560px;
  width: calc(100vw - 32px);
  box-shadow: var(--shadow-dialog);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  margin: auto;
}
dialog:not([open]) {
  display: none;
}
dialog::backdrop {
  background: #06101888;
  backdrop-filter: blur(3px);
}

.ask-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--n-100);
}
.ask-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ask-star-mark {
  flex-shrink: 0;
}
.ask-header .eyebrow {
  color: var(--red-700);
}
.ask-header h2 {
  font: 600 20px var(--font-serif);
  color: var(--n-800);
  margin: 4px 0 0;
}
.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--n-100);
  color: var(--n-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--t-fast),
    color var(--t-fast);
  flex-shrink: 0;
}
.close-btn:hover {
  background: var(--n-200);
  color: var(--n-800);
}
.close-btn:focus-visible {
  outline: 2px solid var(--red-700);
  outline-offset: 2px;
}

.ask-desc {
  font-size: 11px;
  color: var(--n-500);
  padding: 12px 24px 8px;
}

#conversation {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
  scrollbar-width: thin;
  scrollbar-color: var(--n-200) transparent;
}
.message {
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  line-height: 1.5;
  max-width: 90%;
}
.message.user {
  background: var(--red-050);
  color: var(--red-800);
  align-self: flex-end;
  border: 1px solid var(--red-100);
}
.message.nunki {
  background: var(--n-050);
  color: var(--n-700);
  border: 1px solid var(--n-200);
  align-self: flex-start;
}
.message-source {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--n-400);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.status-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-full);
  border: 1px solid;
  margin-top: 6px;
}
.status-badge.supported {
  background: var(--c-medium-bg);
  color: var(--c-medium);
  border-color: var(--c-medium-bd);
}
.status-badge.denied {
  background: var(--c-critical-bg);
  color: var(--c-critical);
  border-color: var(--c-critical-bd);
}
.status-badge.insufficient_data {
  background: var(--n-100);
  color: var(--n-600);
  border-color: var(--n-300);
}
details {
  margin-top: 8px;
  font-size: 10px;
  color: var(--n-500);
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--n-600);
}
details ul {
  list-style: disc;
  padding-left: 18px;
  margin-top: 5px;
}

.ask-form {
  padding: 12px 24px 8px;
}
.ask-input-row {
  display: flex;
  gap: 8px;
}
.ask-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-md);
  font: inherit;
  font-size: 13px;
  background: var(--n-000);
  color: var(--n-800);
  transition: border-color var(--t-fast);
}
.ask-input-row input:focus {
  outline: none;
  border-color: var(--red-700);
}
.ask-input-row button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--red-700);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--t-fast);
}
.ask-input-row button:hover {
  background: var(--red-800);
}
.ask-input-row button:focus-visible {
  outline: 2px solid var(--red-500);
  outline-offset: 2px;
}

.ask-disclaimer {
  font-size: 10px;
  color: var(--n-400);
  padding: 8px 24px 20px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first, tablet, notebook, desktop
══════════════════════════════════════════════════════════════════════════════ */

/* ── Smartphone (< 600px) ───────────────────────────────────────────────────── */
@media (max-width: 599px) {
  /* Landing */
  .landing-nav {
    padding: 16px 20px;
  }
  .landing-hero {
    padding: 48px 24px 40px;
    min-height: 420px;
  }
  .landing-tagline-line {
    font-size: 36px;
  }
  .landing-ctas {
    flex-direction: column;
  }
  .landing-btn {
    justify-content: center;
  }
  .landing-footer {
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px;
  }
  /* Keep the Ask NUNKI trigger label visible at all sizes. */
  .search-btn.ask-nunki-trigger span {
    display: inline;
  }
  .search-btn.ask-nunki-trigger {
    gap: 5px;
    padding: 4px 7px 4px 5px;
    font-size: 10px;
  }
  .search-btn.ask-nunki-trigger .ask-nunki-trigger-avatar {
    width: 20px;
    height: 20px;
  }
  /* Landing sections mobile */
  .landing-section {
    padding: 48px 24px;
  }
  #landing-how,
  #landing-ask {
    padding: 48px 0;
  }
  #landing-how .section-eyebrow,
  #landing-how .section-title,
  #landing-ask .section-eyebrow,
  #landing-ask .section-title {
    padding-left: 24px;
    padding-right: 24px;
  }
  #landing-how .how-steps,
  #landing-ask .ask-nunki-block {
    padding-left: 24px;
    padding-right: 24px;
  }
  .fragment-grid {
    grid-template-columns: 1fr;
  }
  .how-steps {
    grid-template-columns: 1fr;
  }
  .deliverables-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ask-nunki-block {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .trust-attrs {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .landing-trust-highlight {
    padding: 48px 24px;
  }
  .audiences-grid {
    grid-template-columns: 1fr;
  }
  .landing-final-cta {
    padding: 48px 24px;
  }
  .section-title {
    font-size: 26px;
  }

  /* Touch targets ≥ 44 px on mobile */
  #menu {
    width: 44px;
    height: 44px;
  }
  .nav-item {
    min-height: 44px;
    padding: 12px 10px;
  }
  .lang-btn {
    min-height: 44px;
    padding: 0 14px;
  }
  .header-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Header title — prevent ugly overflow */
  .header-title {
    min-width: 0;
    overflow: hidden;
  }
  #route-eyebrow {
    display: none;
  }
  #route-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Onboarding */
  .onboarding-header {
    padding: 16px 0 20px;
    margin-bottom: 20px;
  }
  .ob-back-to-landing {
    min-height: 44px;
    padding: 9px 12px;
  }
  .ob-type-options {
    grid-template-columns: 1fr;
  }
  .ob-objectives {
    grid-template-columns: 1fr;
  }

  /* Main app */
  #menu {
    display: flex;
  }
  aside {
    transform: translateX(-100%);
    transition: transform var(--t-slow);
    width: 260px;
  }
  body.menu-open aside {
    transform: translateX(0);
  }
  .shell {
    grid-template-columns: 1fr;
  }
  main {
    grid-column: 1;
  }
  header {
    padding: 0 16px;
  }
  #content {
    padding: 20px 16px 48px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .insight-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-actions .org-btn {
    display: none;
  }
  .header-actions .demo-badge {
    display: none;
  }
  .sim-scenarios {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-tiers {
    grid-template-columns: 1fr;
  }
  .exp-day {
    grid-template-columns: 80px 1fr;
  }
  .exp-day-act {
    display: none;
  }
  .opp-grid {
    grid-template-columns: 1fr 1fr;
  }
  .buyer-grid {
    grid-template-columns: 1fr;
  }
  .module-stats {
    grid-template-columns: 1fr 1fr;
  }
  .record-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .record-version {
    display: none;
  }
  .welcome {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ── Tablet (600–1023px) ────────────────────────────────────────────────────── */
@media (min-width: 600px) and (max-width: 1023px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding: 60px 40px 48px;
  }
  .landing-graph-deco {
    display: none;
  }
  .landing-tagline-line {
    font-size: 44px;
  }

  #menu {
    display: flex;
  }
  aside {
    transform: translateX(-100%);
    transition: transform var(--t-slow);
  }
  body.menu-open aside {
    transform: translateX(0);
  }
  .shell {
    grid-template-columns: 1fr;
  }
  main {
    grid-column: 1;
  }
  header {
    padding: 0 24px;
  }
  #content {
    padding: 24px 24px 48px;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .insight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sim-scenarios {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-actions .org-btn {
    display: none;
  }
}

/* ── Notebook/Desktop (≥ 1024px) ────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .shell {
    grid-template-columns: 240px 1fr;
  }
  main {
    grid-column: 2;
  }
  #menu {
    display: none;
  }
  aside {
    transform: none !important;
  }
  .nav-backdrop {
    display: none !important;
  }
}

/* ── Very small phones (≤ 390px) ───────────────────────────────────────────── */
@media (max-width: 390px) {
  .landing-hero {
    padding: 40px 16px 36px;
  }
  .landing-tagline-line {
    font-size: 30px;
  }
  .landing-section {
    padding: 36px 16px;
  }
  .landing-trust-highlight {
    padding: 36px 16px;
  }
  .landing-final-cta {
    padding: 36px 16px;
  }
  /* Single column deliverables on very narrow phones */
  .deliverables-grid {
    grid-template-columns: 1fr;
  }
  .ask-mock-q,
  .ask-mock-a {
    font-size: 11px;
    padding: 8px 10px;
    max-width: 100%;
  }
  .section-title {
    font-size: 22px;
  }
  header {
    padding: 0 16px;
    gap: 10px;
  }
  #content {
    padding: 18px 16px 40px;
  }
}

/* ── Large desktop (≥ 1440px) ───────────────────────────────────────────────── */
@media (min-width: 1440px) {
  .landing-hero {
    padding: 100px 80px 80px;
  }
  .landing-tagline-line {
    font-size: 60px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PR #79 — Personalized Product Experience & Commercial Foundation
   SYNTHETIC_DEMO_ONLY · Production Readiness: NOT STARTED
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Onboarding: two-column row layout ─────────────────────────────────────── */
.ob-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .ob-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Onboarding: responsible section divider ───────────────────────────────── */
.ob-section-divider {
  height: 1px;
  background: rgba(196, 205, 200, 0.35);
  margin: 8px 0 4px;
}
.ob-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0 0 2px;
}
.ob-section-hint {
  font-size: 11px;
  color: #9ca3af;
  margin: 0 0 10px;
}

/* ── Onboarding: error states ──────────────────────────────────────────────── */
.ob-error {
  display: block;
  font-size: 11px;
  color: #dc2626;
  margin-top: 4px;
  font-weight: 500;
}
.ob-input--error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.12);
}
.ob-hint--error {
  color: #dc2626 !important;
  font-weight: 500;
}

/* ── Account menu dropdown ─────────────────────────────────────────────────── */
.avatar-btn {
  position: relative;
  cursor: pointer;
}
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
  animation: accountMenuIn 0.14s ease-out;
}
@keyframes accountMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.account-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.account-menu-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #374151;
}
.account-menu-demo-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
  border-radius: 3px;
  padding: 1px 5px;
}
.account-menu-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
.account-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: none;
  border: none;
  color: #1c2b22;
  font-size: 13px;
  font-family: inherit;
  cursor: default;
  text-align: left;
  gap: 8px;
  transition: background 0.1s;
}
.account-menu-item:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.05);
  cursor: pointer;
}
.account-menu-item:disabled {
  opacity: 0.6;
}
.account-menu-cs {
  font-size: 10px;
  color: #6b7280;
  font-style: italic;
  flex-shrink: 0;
}
.account-menu-lang-current {
  font-size: 10px;
  color: #dc2626;
  font-weight: 700;
  font-style: normal;
}
.account-menu-arrow {
  color: #6b7280;
  font-size: 12px;
}
.account-menu-sep {
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 4px 0;
}
.account-menu-item--signout {
  color: #dc2626;
}
/* Ensure header has position context for the dropdown */
header .header-right {
  position: relative;
}

/* ── Ask NUNKI thinking animation ────────────────────────────────────────── */
@keyframes thinkingPulse {
  0%,
  80%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.1);
  }
}
.thinking-dots {
  display: inline-flex;
  gap: 5px;
  margin-right: 6px;
}
.thinking-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-600, #dc2626);
  animation: thinkingPulse 1.2s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
.thinking-text {
  font-size: 13px;
  color: #6b7280;
  display: inline;
}
@media (prefers-reduced-motion: reduce) {
  .thinking-dots span {
    animation: none;
    opacity: 0.6;
  }
}

/* ── Ask NUNKI empty state ────────────────────────────────────────────────── */
.ask-intro-hint {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  padding: 24px 16px;
  margin: 0;
}

/* ── Objective groups (ob-type = both) ───────────────────────────────────── */
.ob-obj-group {
  margin-bottom: 14px;
}
.ob-obj-group-header {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--n-600);
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--n-100);
}

/* ── Product card image placeholder with icon ────────────────────────────── */
.product-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.product-img-placeholder-icon {
  font-size: 28px;
  line-height: 1;
}
.product-img-placeholder-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

/* ── NUNKI avatar SVG ──────────────────────────────────────────────────────── */
.nunki-avatar-svg {
  display: block;
}
/* ── NUNKI avatar dark mode ── */
@media (prefers-color-scheme: dark) {
  .nunki-avatar-svg {
    --avatar-fill: #f87171;
  }
}

/* ── Role-specific financial metrics grid ──────────────────────────────────── */
.role-metrics-panel {
  margin-bottom: 16px;
}
.role-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 0 8px;
}
@media (max-width: 640px) {
  .role-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 400px) {
  .role-metrics-grid {
    grid-template-columns: 1fr;
  }
}
.role-metric-card {
  background: rgba(196, 205, 200, 0.04);
  border: 1px solid rgba(196, 205, 200, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.role-metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9ca3af; /* improved contrast on dark app surface */
  text-transform: uppercase;
}
.role-metric-value {
  font-size: 16px;
  font-weight: 700;
  color: #e8edeb;
  font-variant-numeric: tabular-nums;
}
.demo-tag--small {
  font-size: 8px;
  padding: 1px 4px;
}

/* ── NUNKI Sales Assistant panel ───────────────────────────────────────────── */
.sales-assistant-panel {
  margin-top: 16px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: rgba(220, 38, 38, 0.04);
}
.sales-assistant-intro {
  font-size: 13px;
  color: #c4cdc8;
  margin: 8px 0 14px;
}
.sales-assistant-plan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(196, 205, 200, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(196, 205, 200, 0.1);
}
.sales-assistant-plan-name {
  font-size: 20px;
  font-weight: 800;
  color: #dc2626;
  letter-spacing: -0.02em;
}

/* ── Expeditions: responsive picture element ───────────────────────────────── */
.exp-hero picture {
  display: contents;
}

/* ── Products: consistent card min-height ──────────────────────────────────── */
.product-card {
  min-height: 280px;
}
.product-img-placeholder {
  min-height: 160px;
  background: rgba(196, 205, 200, 0.06);
  border-radius: 6px 6px 0 0;
}
