/* ============================================================
   DBC-1 MRV Application — Main Stylesheet
   Design: Refined editorial · Azure blue corporate tones
   Fonts: Instrument Serif (headings) + DM Sans (body)
   ============================================================ */

:root {
  /* Brand palette — Azure Blue */
  --dbc-green-900: #091b33;
  --dbc-green-800: #0f2b4e;
  --dbc-green-700: #0a58a6;
  --dbc-green-600: #0078d4;
  --dbc-green-500: #2b88d8;
  --dbc-green-400: #4ba6eb;
  --dbc-green-300: #a8d4f0;
  --dbc-green-200: #c8e6f8;
  --dbc-green-100: #cce4f6;
  --dbc-green-50:  #e8f2fc;

  --dbc-ocean-900: #091b33;
  --dbc-ocean-800: #0f2b4e;
  --dbc-ocean-700: #0a58a6;
  --dbc-ocean-500: #0078d4;
  --dbc-ocean-100: #cce4f6;

  --dbc-amber-500: #d4860f;
  --dbc-amber-100: #fdf0d5;
  --dbc-red-500:   #c0392b;
  --dbc-red-100:   #fdecea;
  --dbc-sand-100:  #edf2f7;
  --dbc-sand-50:   #f4f7fb;

  /* Layout */
  --sidebar-w:     248px;
  --topnav-h:      52px;
  --content-pad:   28px;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;

  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;

  /* Transitions */
  --ease:       cubic-bezier(.4,0,.2,1);
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
  background: var(--dbc-sand-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, iframe, canvas { max-width: 100%; }

/* ── Top navbar ───────────────────────────────────────────── */
.dbc-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-h);
  background: var(--dbc-green-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}

.dbc-topnav__brand { display: flex; align-items: center; gap: 12px; }

.dbc-topnav__logo {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--dbc-green-400);
  letter-spacing: .5px;
}

.dbc-topnav__title {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  letter-spacing: .2px;
}

.dbc-topnav__right { display: flex; align-items: center; gap: 16px; }

.dbc-topnav__round {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  display: flex; align-items: center; gap: 5px;
}

.dbc-topnav__user {
  background: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  color: rgba(255,255,255,.85);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: border-color .2s var(--ease);
}
.dbc-topnav__user:hover { border-color: rgba(255,255,255,.4); }

/* ── Layout ───────────────────────────────────────────────── */
.dbc-layout {
  display: flex;
  padding-top: var(--topnav-h);
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.dbc-sidebar {
  position: fixed;
  top: var(--topnav-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--topnav-h));
  background: #ffffff;
  border-right: 1px solid #dde5ed;
  display: flex;
  flex-direction: column;
  transition: width .25s ease;
  overflow-y: auto;
  z-index: 900;
}

.dbc-nav { flex: 1; padding: 12px 0; }

.dbc-nav__group-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: #aaa;
  padding: 14px 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.dbc-nav__group-label:hover { color: #555; }
.dbc-nav__group-label:hover .dbc-nav__group-toggle { color: #333; }
.dbc-nav__group-toggle {
  font-size: 13px;
  line-height: 1;
  color: #666;
  flex-shrink: 0;
  background: #f0f0f0;
  border-radius: 3px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dbc-nav__section { padding: 2px 10px; }
.dbc-nav__section.dbc-nav--collapsed { display: none; }

.dbc-nav__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: #444;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  transition: background .15s var(--ease), color .15s var(--ease);
  position: relative;
}

.dbc-nav__item i { font-size: 15px; opacity: .75; flex-shrink: 0; }
.dbc-nav__item span { flex: 1; }

.dbc-nav__item:hover {
  background: var(--dbc-green-50);
  color: var(--dbc-green-700);
}
.dbc-nav__item:hover i { opacity: 1; }

.dbc-nav__item.active {
  background: var(--dbc-green-50);
  color: var(--dbc-green-700);
  font-weight: 500;
}
.dbc-nav__item.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--dbc-green-500);
  border-radius: 2px;
}
.dbc-nav__item.active i { opacity: 1; color: var(--dbc-green-600); }

.dbc-sidebar__footer {
  padding: 14px 20px;
  border-top: 1px solid #dde5ed;
}
.dbc-sidebar__project { font-size: 11px; font-weight: 500; color: #666; }
.dbc-sidebar__version  { font-size: 10px; color: #aaa; margin-top: 2px; }

/* ── Sidebar collapsed (toggle) ───────────────────────────── */
.dbc-sidebar.collapsed {
  width: 0;
  border-right-color: transparent;
  overflow: hidden;
}
body.sidebar-collapsed .dbc-main {
  margin-left: 0;
  max-width: 100vw;
}

/* ── Main content area ────────────────────────────────────── */
.dbc-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: var(--content-pad);
  min-height: calc(100vh - var(--topnav-h));
  min-width: 0;
  overflow-x: hidden;
  max-width: calc(100vw - var(--sidebar-w));
  transition: margin-left .25s ease, max-width .25s ease;
}
.dbc-main--full {
  margin-left: 0;
  max-width: 100vw;
}

/* ── Page header ──────────────────────────────────────────── */
.dbc-page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #dde5ed;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dbc-page-header__left h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--dbc-green-900);
  line-height: 1.2;
}

.dbc-page-header__left .subtitle {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}

.dbc-page-header__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Cards ────────────────────────────────────────────────── */
.dbc-card {
  background: #fff;
  border: 1px solid #dde5ed;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dbc-card__header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid #dde5ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dbc-card__title {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  gap: 7px;
}
.dbc-card__title i { color: var(--dbc-green-600); }

.dbc-card__body { padding: 20px; }

/* ── Stat cards ───────────────────────────────────────────── */
.dbc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }

.dbc-stat {
  background: #fff;
  border: 1px solid #dde5ed;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.dbc-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-accent, var(--dbc-green-500));
}

.dbc-stat--danger  { --stat-accent: var(--dbc-red-500); }
.dbc-stat--warning { --stat-accent: var(--dbc-amber-500); }
.dbc-stat--ocean   { --stat-accent: var(--dbc-ocean-500); }
.dbc-stat--green   { --stat-accent: var(--dbc-green-500); }
.dbc-stat--info    { --stat-accent: var(--dbc-ocean-500); }
/* Clickable stat card */
.dbc-stats a { text-decoration: none; color: inherit; display: block; transition: transform .1s, box-shadow .15s; border-radius: var(--radius-md); outline: none; }
.dbc-stats a:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.dbc-stats a:hover .dbc-stat__value { color: var(--stat-accent, var(--dbc-green-600)); }

/* Clickable number link in tables */
.dbc-link-num { font-weight: 600; text-decoration: none; }
.dbc-link-num:hover { opacity: .75; }

.dbc-stat__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}

.dbc-stat__value {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--dbc-green-900);
  line-height: 1;
}

.dbc-stat__sub {
  font-size: 11px;
  color: #999;
  margin-top: 5px;
}

/* ── Badges ───────────────────────────────────────────────── */
.dbc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
}

.dbc-badge--danger  { background: var(--dbc-red-100);  color: var(--dbc-red-500); }
.dbc-badge--warning { background: var(--dbc-amber-100); color: var(--dbc-amber-500); }
.dbc-badge--success { background: var(--dbc-green-100); color: var(--dbc-green-700); }
.dbc-badge--info    { background: var(--dbc-ocean-100); color: var(--dbc-ocean-700); }
.dbc-badge--gray    { background: #e4eaf0; color: #666; }

/* ── Status dots ──────────────────────────────────────────── */
.dbc-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500;
}
.dbc-status::before {
  content: ''; width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--status-color, #aaa);
}
.dbc-status--completed { color: var(--dbc-green-600); --status-color: var(--dbc-green-500); }
.dbc-status--pending   { color: #888;                  --status-color: #ccc; }
.dbc-status--overdue   { color: var(--dbc-red-500);   --status-color: var(--dbc-red-500); }
.dbc-status--inprogress{ color: var(--dbc-ocean-500); --status-color: var(--dbc-ocean-500); }
.dbc-status--draft     { color: var(--dbc-amber-500); --status-color: var(--dbc-amber-500); }

/* ── Tabs ─────────────────────────────────────────────────── */
.dbc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: #edf2f7;
  border: 1px solid #d0dbe6;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.dbc-tabs__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  padding-top: 7px; /* compensates for top border */
  font-size: 12px;
  font-weight: 500;
  color: #777;
  text-decoration: none;
  border-radius: 7px;
  border-top: 3px solid var(--tab-accent, #d1d5db);
  white-space: nowrap;
  flex: 1 0 calc(100% / 6 - 1px);
  min-width: 0;
  transition: color .15s, background .15s, box-shadow .15s;
  letter-spacing: .1px;
  text-align: center;
}

.dbc-tabs__tab i {
  font-size: 12px;
  opacity: .75;
  flex-shrink: 0;
}

/* hover overridden by per-tab accent below */

.dbc-tabs__tab--active {
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
  color: var(--tab-accent, #1e5c38);
}

.dbc-tabs__tab--active i {
  opacity: 1;
}

/* Per-tab accent colors — each position gets a unique color */
.dbc-tabs .dbc-tabs__tab:nth-child(1)  { --tab-accent: #0891b2; }
.dbc-tabs .dbc-tabs__tab:nth-child(2)  { --tab-accent: #059669; }
.dbc-tabs .dbc-tabs__tab:nth-child(3)  { --tab-accent: #7c3aed; }
.dbc-tabs .dbc-tabs__tab:nth-child(4)  { --tab-accent: #d97706; }
.dbc-tabs .dbc-tabs__tab:nth-child(5)  { --tab-accent: #2563eb; }
.dbc-tabs .dbc-tabs__tab:nth-child(6)  { --tab-accent: #0f766e; }
.dbc-tabs .dbc-tabs__tab:nth-child(7)  { --tab-accent: #15803d; }
.dbc-tabs .dbc-tabs__tab:nth-child(8)  { --tab-accent: #b45309; }
.dbc-tabs .dbc-tabs__tab:nth-child(9)  { --tab-accent: #6d28d9; }
.dbc-tabs .dbc-tabs__tab:nth-child(10) { --tab-accent: #0369a1; }
.dbc-tabs .dbc-tabs__tab:nth-child(11) { --tab-accent: #be185d; }
.dbc-tabs .dbc-tabs__tab:nth-child(12) { --tab-accent: #c2410c; }

.dbc-tabs__tab:hover {
  color: var(--tab-accent, #2d7a4f);
  background: color-mix(in srgb, var(--tab-accent, #2d7a4f) 8%, transparent);
  text-decoration: none;
}

/* ── Tables ───────────────────────────────────────────────── */
.dbc-table-wrap { overflow-x: auto; }

.dbc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dbc-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #888;
  border-bottom: 1px solid #dde5ed;
  white-space: nowrap;
}

.dbc-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #e8eef4;
  color: #333;
  vertical-align: middle;
}

.dbc-table tbody tr:hover td { background: #f4f7fb; }
.dbc-table tbody tr:last-child td { border-bottom: none; }

/* ── Buttons ──────────────────────────────────────────────── */
.dbc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s var(--ease);
  white-space: nowrap;
}

.dbc-btn--primary {
  background: var(--dbc-green-700);
  color: #fff;
}
.dbc-btn--primary:hover { background: var(--dbc-green-600); color: #fff; }

.dbc-btn--secondary {
  background: #fff;
  color: #444;
  border: 1px solid #ddd;
}
.dbc-btn--secondary:hover { background: #e8eef4; color: #222; }

.dbc-btn--danger {
  background: var(--dbc-red-100);
  color: var(--dbc-red-500);
}
.dbc-btn--danger:hover { background: var(--dbc-red-500); color: #fff; }

.dbc-btn--success {
  background: #198754;
  color: #fff;
}
.dbc-btn--success:hover { background: #157347; color: #fff; }

.dbc-btn--ocean {
  background: var(--dbc-ocean-800);
  color: #fff;
}
.dbc-btn--ocean:hover { background: var(--dbc-ocean-700); color: #fff; }

.dbc-btn--sm { padding: 4px 11px; font-size: 12px; }
.dbc-btn--lg { padding: 10px 22px; font-size: 14px; }

/* ── Forms ────────────────────────────────────────────────── */
.dbc-form-group { margin-bottom: 18px; }

.dbc-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  margin-bottom: 5px;
  letter-spacing: .2px;
}

.dbc-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: #222;
  background: #fff;
  box-sizing: border-box;
  line-height: 1.5;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

select.dbc-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%23666' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

textarea.dbc-input {
  height: auto;
  min-height: 38px;
  padding: 8px 12px;
  resize: vertical;
}

.dbc-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: #222;
  background: #fff;
  box-sizing: border-box;
  line-height: 1.5;
  resize: vertical;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.dbc-textarea:focus {
  outline: none;
  border-color: var(--dbc-green-500);
  box-shadow: 0 0 0 3px rgba(0,120,212,.12);
}

input.dbc-input[disabled], input.dbc-input:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
}

.dbc-input:focus {
  outline: none;
  border-color: var(--dbc-green-500);
  box-shadow: 0 0 0 3px rgba(0,120,212,.12);
}

.dbc-input--mono { font-family: var(--font-mono); font-size: 13px; }

.dbc-hint { font-size: 11px; color: #999; margin-top: 4px; }

/* ── Alerts ───────────────────────────────────────────────── */
.dbc-alert {
  border: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.dbc-alert--success { background: var(--dbc-green-50); color: var(--dbc-green-800); }
.dbc-alert--danger  { background: var(--dbc-red-100);  color: var(--dbc-red-500); }
.dbc-alert--warning { background: var(--dbc-amber-100); color: #7a5100; }

/* ── Scope badge (department filter indicator) ────────────── */
.dbc-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.dbc-scope-badge--dept {
  background: var(--dbc-ocean-100);
  color: var(--dbc-ocean-800);
  border: 1px solid var(--dbc-ocean-200, #bae0f7);
}

/* ── GHG specific ─────────────────────────────────────────── */
.dbc-ner-gauge-wrap {
  text-align: center;
  padding: 20px;
}

.dbc-ner-gauge-wrap canvas { max-width: 260px; }

.dbc-ner-value {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--dbc-green-800);
  margin-top: 8px;
}

.dbc-ner-label { font-size: 12px; color: #888; }

.dbc-calc-log-entry {
  border-left: 3px solid var(--dbc-green-400);
  padding: 10px 14px;
  background: var(--dbc-green-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 8px;
}

.dbc-calc-log-entry .timestamp { font-size: 11px; color: #888; }
.dbc-calc-log-entry .equations { font-family: var(--font-mono); font-size: 11px; color: var(--dbc-green-700); }

/* ── Checklist ────────────────────────────────────────────── */
.dbc-task-card {
  background: #fff;
  border: 1px solid #dde5ed;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .15s var(--ease);
}

.dbc-task-card:hover { border-color: var(--dbc-green-400); }

.dbc-task-card--overdue { border-left: 3px solid var(--dbc-red-500); }
.dbc-task-card--due     { border-left: 3px solid var(--dbc-amber-500); }
.dbc-task-card--done    { border-left: 3px solid var(--dbc-green-400); opacity: .7; }

.dbc-task-card__domain {
  min-width: 52px;
  max-width: 80px;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CCB standard: Climate (GHG+SIA)=amber, Community=teal, Biodiversity(BIA)=green */
.dbc-domain--ghg        { background: var(--dbc-amber-100); color: #7a5100; }
.dbc-domain--sia        { background: var(--dbc-amber-100); color: #7a5100; }   /* Climate group */
.dbc-domain--community  { background: var(--dbc-ocean-100); color: var(--dbc-ocean-800); }
.dbc-domain--bia        { background: var(--dbc-green-100); color: var(--dbc-green-800); }
.dbc-domain--operational{ background: #e4eaf0; color: #555; }
.dbc-domain--reporting  { background: var(--dbc-red-100); color: var(--dbc-red-500); }

/* CCB group separator rows in tables */
.dbc-group-row td {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 6px 16px !important;
  border-bottom: none !important;
}
.dbc-group-row td i { margin-right: 5px; font-size: 12px; }

/* Colored table header cells — same 3px inset top strip as .dbc-stat::before */
.dbc-th--red   { box-shadow: inset 0 3px 0 var(--dbc-red-500);   color: var(--dbc-red-500); }
.dbc-th--amber { box-shadow: inset 0 3px 0 var(--dbc-amber-500); color: var(--dbc-amber-500); }
.dbc-th--green { box-shadow: inset 0 3px 0 var(--dbc-green-500); color: var(--dbc-green-600); }
.dbc-th--ocean { box-shadow: inset 0 3px 0 var(--dbc-ocean-500); color: var(--dbc-ocean-700); }

.dbc-task-card__body { flex: 1; min-width: 0; overflow: hidden; }
.dbc-task-card__name {
  font-size: 13.5px; font-weight: 500; color: #222;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dbc-task-card__meta {
  font-size: 11px; color: #999; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.dbc-task-card__actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

/* Responsive: stack vertically on narrow screens */
@media (max-width: 576px) {
  .dbc-task-card {
    flex-wrap: wrap;
    gap: 8px;
  }
  .dbc-task-card__domain {
    max-width: none;
  }
  .dbc-task-card__name,
  .dbc-task-card__meta {
    white-space: normal;
  }
  .dbc-task-card__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ── Progress bar ─────────────────────────────────────────── */
.dbc-progress { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.dbc-progress-bar {
  height: 100%;
  background: var(--dbc-green-500);
  border-radius: 3px;
  transition: width .4s var(--ease);
}
.dbc-progress-bar--warning { background: var(--dbc-amber-500); }
.dbc-progress-bar--danger  { background: var(--dbc-red-500); }

/* ── Breadcrumb ───────────────────────────────────────────── */
.dbc-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #888; margin-bottom: 16px;
}
.dbc-breadcrumb a { color: var(--dbc-green-600); text-decoration: none; }
.dbc-breadcrumb a:hover { text-decoration: underline; }
.dbc-breadcrumb__sep { color: #ccc; }

/* ── Section titles ───────────────────────────────────────── */
.dbc-section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--dbc-green-900);
  margin-bottom: 16px;
}

/* ── Equation display ─────────────────────────────────────── */
.dbc-equation {
  background: var(--dbc-green-50);
  border: 1px solid var(--dbc-green-100);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--dbc-green-800);
  margin: 8px 0;
}

/* ── Hamburger button (always visible) ────────────────────── */
.dbc-topnav__hamburger {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  line-height: 1;
  transition: color .15s;
}
.dbc-topnav__hamburger:hover { color: #fff; }

/* ── Sidebar overlay (mobile) ─────────────────────────────── */
.dbc-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 899;
}
.dbc-sidebar-overlay.active { display: block; }

/* ── Responsive: Tablet (≤ 1024px) ───────────────────────── */
@media (max-width: 1024px) {
  :root { --content-pad: 20px; }

  .dbc-page-header__actions {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* ── Responsive: Mobile-tablet (≤ 900px) ─────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; --content-pad: 16px; }

  /* Topnav: hide subtitle on small screens */
  .dbc-topnav__title { display: none; }

  /* Sidebar slides in from left */
  .dbc-sidebar {
    transform: translateX(-100%);
    transition: transform .25s var(--ease);
    z-index: 950;
    width: 260px;
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
  }
  .dbc-sidebar.open { transform: translateX(0); }

  /* Main content full-width */
  .dbc-main { margin-left: 0; padding: var(--content-pad); max-width: 100vw; }

  /* Stats grid: 2 cols */
  .dbc-stats { grid-template-columns: 1fr 1fr; }

  /* Cards: tighter padding */
  .dbc-card__body { padding: 14px 16px; }
  .dbc-card__header { padding: 10px 16px; }

  /* Tables: scroll horizontally */
  .dbc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Page header: wrap actions below title */
  .dbc-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .dbc-page-header__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  /* Tabs: already scrollable, just tighten padding */
  .dbc-tabs__tab { padding: 6px 10px; font-size: 11.5px; }
}

/* ── Responsive: Mobile (≤ 600px) ────────────────────────── */
@media (max-width: 600px) {
  :root { --content-pad: 12px; --topnav-h: 48px; }

  /* Topnav: compact */
  .dbc-topnav { padding: 0 12px; }
  .dbc-topnav__logo { font-size: 16px; }

  /* Stats: single column */
  .dbc-stats { grid-template-columns: 1fr; }

  /* Buttons: allow wrapping */
  .dbc-page-header__actions .dbc-btn { flex: 1 1 auto; justify-content: center; }

  /* Task cards: stack */
  .dbc-task-card { flex-wrap: wrap; }
  .dbc-task-card__domain { max-width: none; }
  .dbc-task-card__actions { width: 100%; justify-content: flex-end; }

  /* Reduce card padding */
  .dbc-card__body { padding: 12px; }

  /* Tabs: even more compact */
  .dbc-tabs { padding: 3px; }
  .dbc-tabs__tab { padding: 5px 9px; font-size: 11px; gap: 4px; }
  .dbc-tabs__tab i { display: none; }  /* hide icons on very small screens */

  /* Topnav right: compact */
  .dbc-topnav__round { display: none; }
}

/* ── Responsive: Very small (≤ 400px) ────────────────────── */
@media (max-width: 400px) {
  .dbc-page-header h1 { font-size: 18px; }
  .dbc-stat__value { font-size: 22px; }
}

/* ============================================================
   LANDING PAGE  (standalone — no app nav/sidebar)
   ============================================================ */

/* Reset for standalone page */
body.landing-page {
  background: #fff;
  overflow-x: hidden;
}

/* ── Top bar ──────────────────────────────────────────────── */
.lp-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.lp-topbar--scrolled {
  background: var(--dbc-green-900);
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.lp-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-topbar__logo {
  background: var(--dbc-green-500);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 7px 18px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
}
.lp-topbar__title {
  color: rgba(255,255,255,.9);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
}
.lp-topbar__nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.lp-topbar__nav a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color .2s;
}
.lp-topbar__nav a:hover { color: #fff; }
.lp-topbar__cta {
  background: var(--dbc-green-500) !important;
  color: #fff !important;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: background .2s !important;
}
.lp-topbar__cta:hover { background: var(--dbc-green-400) !important; }

/* ── Hero ─────────────────────────────────────────────────── */
.lp-hero--compact {
  min-height: 60vh !important;
  padding-bottom: 60px !important;
}
.lp-hero--compact .lp-hero__title  { font-size: clamp(40px, 6vw, 64px); }
.lp-hero--compact .lp-hero__rings  { display: none; }

.lp-hero {
  min-height: 100vh;
  background: linear-gradient(155deg,
    #091b33  0%,
    #0f2b4e 45%,
    #0a3d6e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 40px 0;
  position: relative;
  overflow: hidden;
}

/* Radial glow */
.lp-hero::after {
  content: '';
  position: absolute;
  top: 20%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,120,212,.22) 0%, transparent 70%);
  pointer-events: none;
}

/* Ripple rings */
.lp-hero__rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.lp-hero__rings span {
  position: absolute;
  top: 42%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0,120,212,.15);
  animation: lp-ring-expand 6s ease-out infinite;
}
.lp-hero__rings span:nth-child(1) { width: 300px; height: 300px; animation-delay: 0s; }
.lp-hero__rings span:nth-child(2) { width: 500px; height: 500px; animation-delay: 1.5s; }
.lp-hero__rings span:nth-child(3) { width: 700px; height: 700px; animation-delay: 3s; }
@keyframes lp-ring-expand {
  0%   { opacity: .6; transform: translate(-50%,-50%) scale(.8); }
  100% { opacity: 0;  transform: translate(-50%,-50%) scale(1.4); }
}

.lp-hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.lp-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,120,212,.2);
  border: 1px solid rgba(0,120,212,.4);
  color: var(--dbc-green-400);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.lp-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8vw, 88px);
  line-height: 1.0;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -.02em;
}
.lp-hero__title em {
  font-style: italic;
  color: var(--dbc-green-400);
}
.lp-hero__subtitle {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 300;
  color: rgba(255,255,255,.65);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.lp-hero__desc {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto 40px;
}
.lp-hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* Buttons */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s var(--ease);
  cursor: pointer;
}
.lp-btn--primary {
  background: var(--dbc-green-500);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,120,212,.4);
}
.lp-btn--primary:hover {
  background: var(--dbc-green-400);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0,120,212,.5);
}
.lp-btn--ghost {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(6px);
}
.lp-btn--ghost:hover {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* Bottom wave */
.lp-hero__wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 80px;
  line-height: 0;
}
.lp-hero__wave svg { width: 100%; height: 100%; }

/* ── Stats strip ──────────────────────────────────────────── */
.lp-stats {
  background: #fff;
  padding: 72px 40px;
}
.lp-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2px;
  max-width: 1100px;
  margin: 0 auto;
}
.lp-stat {
  text-align: center;
  padding: 28px 12px;
  border-right: 1px solid #dde5ed;
  transition: background .2s;
  min-width: 0; /* prevent grid blowout */
}
.lp-stat:last-child { border-right: none; }
.lp-stat:hover { background: #f4f7fb; }
.lp-stat__icon {
  font-size: 18px;
  color: var(--dbc-green-500);
  margin-bottom: 8px;
}
.lp-stat__number {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 34px);
  color: var(--dbc-green-800);
  line-height: 1.1;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-stat__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #888;
  line-height: 1.3;
}

/* ── Shared section styles ────────────────────────────────── */
.lp-section { padding: 96px 40px; }
.lp-section--sand { background: var(--dbc-sand-50); }
.lp-section--dark {
  background: linear-gradient(155deg, #091b33 0%, #0a3d6e 100%);
}
.lp-section__inner {
  max-width: 1100px;
  margin: 0 auto;
}
.lp-section__header {
  text-align: center;
  margin-bottom: 56px;
}
.lp-section__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dbc-green-600);
  margin-bottom: 12px;
}
.lp-section__eyebrow--light { color: var(--dbc-green-400); }
.lp-section__title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 46px);
  color: var(--dbc-green-900);
  line-height: 1.15;
  margin-bottom: 16px;
}
.lp-section__title--light { color: #fff; }
.lp-section__title em { font-style: italic; color: var(--dbc-green-500); }
.lp-section__title--light em { color: var(--dbc-green-400); }
.lp-section__desc {
  font-size: 15px;
  color: #666;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
}
.lp-section__desc--nowrap {
  max-width: none;
}
.lp-empty { text-align: center; color: #999; font-style: italic; }

/* ── Programme cards — centred, max 3 per row ─────────────── */
.lp-programmes__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.lp-prog-card {
  width: 320px;
  flex: 0 0 320px;
}
.lp-prog-card {
  background: #fff;
  border: 1px solid #dde5ed;
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow .2s, transform .2s;
  box-sizing: border-box;
}
.lp-prog-card:hover {
  box-shadow: 0 8px 32px rgba(9,27,51,.1);
  transform: translateY(-2px);
}
.lp-prog-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.lp-prog-card__code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dbc-green-600);
  background: var(--dbc-green-50);
  padding: 3px 10px;
  border-radius: 12px;
}
.lp-prog-card__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}
.lp-prog-card__badge--active {
  background: var(--dbc-green-100);
  color: var(--dbc-green-700);
}
.lp-prog-card__badge--archived {
  background: #e4eaf0;
  color: #888;
}
.lp-prog-card__name {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--dbc-green-900);
  margin-bottom: 16px;
  line-height: 1.3;
}
.lp-prog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.lp-prog-card__meta span {
  font-size: 12px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 5px;
}
.lp-prog-card__meta i { color: var(--dbc-green-500); }

/* ── Module cards ─────────────────────────────────────────── */
.lp-modules__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.lp-module {
  background: #fff;
  border: 1px solid #dde5ed;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: box-shadow .2s, transform .2s;
}
.lp-module:hover {
  box-shadow: 0 8px 32px rgba(9,27,51,.1);
  transform: translateY(-2px);
}
.lp-module__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.lp-module__icon--green  { background: var(--dbc-green-50);  color: var(--dbc-green-600); }
.lp-module__icon--blue   { background: var(--dbc-ocean-100); color: var(--dbc-ocean-700); }
.lp-module__icon--teal   { background: #e0f4f1;              color: #0d7c6e; }
.lp-module__icon--amber  { background: var(--dbc-amber-100); color: var(--dbc-amber-500); }
.lp-module__icon--indigo { background: #ebe8f8;              color: #5247b5; }
.lp-module__icon--sand   { background: var(--dbc-sand-100);  color: #a07d3a; }
.lp-module__title {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--dbc-green-900);
  margin-bottom: 10px;
}
.lp-module__desc {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
}

/* ── About section ────────────────────────────────────────── */
.lp-about__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: center;
}
.lp-about__body {
  font-size: 15px;
  color: rgba(255,255,255,.65);
  line-height: 1.8;
  margin: 20px 0 28px;
}
.lp-about__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lp-about__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.8);
}
.lp-about__list i {
  color: var(--dbc-green-400);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}
.lp-about__standards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lp-about__standards-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 4px;
}
.lp-standard-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: background .2s;
}
.lp-standard-card:hover { background: rgba(255,255,255,.1); }
.lp-standard-card__logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--dbc-green-400);
  min-width: 36px;
  text-align: center;
}
.lp-standard-card__text {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  line-height: 1.4;
}

/* ── Footer ───────────────────────────────────────────────── */
.lp-footer {
  background: var(--dbc-green-900);
  padding: 28px 40px;
}
.lp-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.lp-footer__brand {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,.8);
  font-size: 14px;
}
.lp-footer__copy {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}
.lp-footer__copy a {
  color: var(--dbc-green-400);
  text-decoration: none;
}

/* ── Landing responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .lp-topbar { padding: 0 20px; }
  .lp-topbar__nav a:not(.lp-topbar__cta) { display: none; }
  .lp-hero { padding: 80px 24px 0; }
  .lp-stats { padding: 48px 20px; }
  .lp-stats__grid { grid-template-columns: repeat(3, 1fr); }
  .lp-stat { border-right: none; border-bottom: 1px solid #dde5ed; }
  .lp-section { padding: 64px 24px; }
  .lp-about__grid { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 600px) {
  .lp-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .lp-modules__grid { grid-template-columns: 1fr; }
  .lp-programmes__grid { grid-template-columns: 1fr; }
}
