/* =========================================================
   Miz@n Ecosystem — UAE National Implementation Study
   UAE Government-Style Theme
   ========================================================= */

:root {
  --navy: #0B2545;
  --navy-2: #143360;
  --gold: #D4A017;
  --gold-soft: #F5E6BE;
  --blue: #1E4D8C;
  --blue-soft: #DBE7F5;
  --green: #10B981;
  --ice: #E8ECF1;
  --paper: #FFFFFF;
  --paper-2: #F7F8FA;
  --paper-3: #F0F3F8;
  --text: #1F2937;
  --text-2: #445566;
  --muted: #6B7280;
  --border: #E0E5EB;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 6px 18px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 16px 40px rgba(11, 37, 69, 0.12);

  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

img, svg, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }

h1, h2, h3, h4 { color: var(--navy); font-family: "Playfair Display", "Inter", Georgia, serif; line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.15rem; font-family: "Inter", sans-serif; font-weight: 700; }
h4 { font-size: 0.95rem; font-family: "Inter", sans-serif; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--navy); }
p  { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.full { grid-column: 1 / -1; }

/* ============= Buttons ============= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: var(--r-sm); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: all 0.18s ease; border: 1px solid transparent; line-height: 1;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--gold); color: var(--navy); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; text-decoration: none; }

/* ============= Top bar ============= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: var(--container); margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--navy); color: var(--gold);
  display: grid; place-items: center;
  font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 22px;
}
.brand-title { font-weight: 700; color: var(--navy); font-size: 1rem; line-height: 1.15; }
.brand-sub { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-2); padding: 8px 12px; border-radius: 6px;
  font-size: 0.9rem; font-weight: 500;
}
.nav a:hover { color: var(--navy); background: var(--paper-3); text-decoration: none; }
.nav .nav-cta {
  background: var(--gold); color: var(--navy); font-weight: 700;
  margin-left: 8px;
}
.nav .nav-cta:hover { background: var(--navy); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: transparent; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; }

/* ============= Hero ============= */
.hero { position: relative; padding: 88px 0 96px; overflow: hidden; background: var(--paper-2); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(212,160,23,0.10), transparent 60%),
    radial-gradient(45% 50% at 10% 90%, rgba(30,77,140,0.08), transparent 60%),
    linear-gradient(180deg, #F7F8FA 0%, #FFFFFF 100%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.25fr 0.85fr; gap: 56px; align-items: center;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em;
  color: var(--gold); text-transform: uppercase;
  background: rgba(212,160,23,0.08); padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(212,160,23,0.25);
  margin-bottom: 22px;
}
.hero-copy h1 { color: var(--navy); margin-bottom: 18px; }
.lede { font-size: 1.1rem; color: var(--text-2); line-height: 1.7; max-width: 60ch; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 12px; align-items: center; margin-top: 26px; color: var(--muted); font-size: 0.88rem; flex-wrap: wrap; }
.hero-meta strong { color: var(--text-2); font-weight: 600; }

.hero-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-md);
}
.card-title {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px; font-family: "Inter", sans-serif;
}
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.figure { padding: 16px; background: var(--paper-3); border-left: 3px solid var(--gold); border-radius: 4px; }
.figure-num { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.55rem; color: var(--navy); line-height: 1.1; }
.figure-label { font-size: 0.78rem; color: var(--text-2); margin-top: 6px; line-height: 1.4; }

/* ============= Sections ============= */
.section { padding: 88px 0; }
.section-alt { background: var(--paper-2); }
.section-head { margin-bottom: 40px; max-width: 800px; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.section-eyebrow.light { color: var(--gold); }
.section-lead { font-size: 1.05rem; color: var(--text-2); margin-top: 8px; max-width: 70ch; }

/* ============= Summary ============= */
.summary-card {
  background: var(--navy); color: #fff;
  padding: 36px 40px;
  border-radius: var(--r-lg);
  font-size: 1.05rem; line-height: 1.7;
  border-left: 6px solid var(--gold);
  margin-bottom: 36px;
}
.takeaways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.takeaway {
  background: #fff; padding: 28px; border-radius: var(--r-md);
  border: 1px solid var(--border); position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.takeaway:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ta-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper-3); color: var(--gold);
  display: grid; place-items: center; font-weight: 700; font-size: 1.2rem;
  margin-bottom: 14px;
}
.takeaway h3 { color: var(--navy); margin-bottom: 6px; font-size: 1.05rem; }
.takeaway p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ============= Products ============= */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 36px; }
.product {
  background: #fff; padding: 24px; border-radius: var(--r-md);
  border: 1px solid var(--border); position: relative; overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--c, var(--gold)); }
.product h3 { color: var(--navy); margin-top: 4px; }
.product p { color: var(--text-2); font-size: 0.94rem; margin: 0; }

/* ============= Cultural frame ============= */
.cultural {
  display: flex; gap: 22px; align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; padding: 32px 36px; border-radius: var(--r-lg); margin-bottom: 36px;
}
.cultural-icon {
  width: 64px; height: 64px; flex-shrink: 0;
  background: var(--gold); color: var(--navy);
  display: grid; place-items: center; border-radius: 50%;
  font-size: 1.8rem; font-weight: 700;
}
.cultural h3 { color: var(--gold); margin-bottom: 6px; }
.cultural h3 em { font-style: italic; color: #fff; }
.cultural p { color: rgba(255,255,255,0.88); margin: 0; }

/* ============= Instances ============= */
.instances { background: #fff; padding: 28px 32px; border-radius: var(--r-md); border: 1px solid var(--border); }
.instances h3 { color: var(--gold); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 14px; font-family: "Inter", sans-serif; }
.instance-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }
.instance-list li strong { color: var(--navy); font-weight: 700; }
.instance-list li .muted { font-size: 0.85rem; margin-left: 6px; }
.pipeline { color: var(--text-2); font-size: 0.95rem; margin-top: 16px; margin-bottom: 0; }

/* ============= Strategic alignment ============= */
.alignments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.alignment {
  background: #fff; border-radius: var(--r-md);
  border: 1px solid var(--border); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.alignment:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.alignment > header { background: var(--navy); color: #fff; padding: 22px 24px; }
.alignment h3 { color: #fff; margin: 0; font-size: 1.2rem; font-family: "Playfair Display", Georgia, serif; }
.alignment .sub { color: var(--gold); font-size: 0.88rem; font-style: italic; margin-top: 4px; }
.alignment .tag {
  padding: 14px 24px 0; color: var(--gold);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.alignment ul { padding: 16px 24px 8px; margin: 0; list-style: none; }
.alignment ul li { position: relative; padding-left: 20px; margin-bottom: 8px; color: var(--text); font-size: 0.95rem; }
.alignment ul li::before { content: "▪"; color: var(--gold); position: absolute; left: 0; top: 0; }
.alignment .contrib {
  padding: 16px 24px 22px; margin-top: auto;
  border-top: 1px solid var(--border);
  color: var(--text-2); font-size: 0.92rem; font-style: italic;
}
.alignment .contrib span {
  display: block; font-style: normal; font-weight: 700;
  color: var(--gold); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 6px;
}

/* ============= Benefits ============= */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }
.kpi {
  background: var(--navy); color: #fff;
  padding: 26px 22px; border-radius: var(--r-md);
  border-bottom: 4px solid var(--gold);
  text-align: center;
}
.kpi-value { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.6rem; color: #fff; line-height: 1.1; }
.kpi-label { font-size: 0.82rem; color: rgba(255,255,255,0.86); margin-top: 8px; }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 36px; }
.chart-card { background: #fff; padding: 22px; border-radius: var(--r-md); border: 1px solid var(--border); }
.chart-card h3 { color: var(--gold); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; font-family: "Inter", sans-serif; }
.chart-wrap { position: relative; height: 260px; }

.benefit-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.benefit {
  background: #fff; padding: 22px 24px; border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.benefit header {
  font-weight: 700; color: var(--navy); font-size: 1rem;
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}
.benefit header span { color: var(--gold); }
.benefit ul { padding: 0; margin: 0; list-style: none; }
.benefit ul li { position: relative; padding-left: 18px; margin-bottom: 6px; color: var(--text-2); font-size: 0.93rem; }
.benefit ul li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }

/* ============= Challenges ============= */
.challenges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.challenge {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 0; overflow: hidden;
  transition: box-shadow 0.18s ease;
}
.challenge[open] { box-shadow: var(--shadow-md); }
.challenge summary {
  list-style: none; padding: 18px 22px; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  font-weight: 700; color: var(--navy);
  border-left: 4px solid #EF4444;
  transition: background 0.15s ease;
}
.challenge summary::-webkit-details-marker { display: none; }
.challenge summary:hover { background: var(--paper-3); }
.cid { background: #EF4444; color: #fff; font-weight: 700; padding: 4px 10px; border-radius: 4px; font-size: 0.82rem; }
.ch-body { padding: 0 22px; margin: 0 0 12px; color: var(--text-2); }
.mitigation {
  margin: 0 22px 22px; padding: 14px 16px;
  background: var(--paper-3); border-left: 3px solid var(--gold);
  font-size: 0.92rem; color: var(--text-2); border-radius: 0 6px 6px 0;
}
.mitigation strong { color: var(--navy); }

/* ============= Risk heatmap ============= */
.heatmap-controls { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.seg {
  background: #fff; border: 1px solid var(--border); padding: 10px 18px;
  border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--text-2);
  transition: all 0.18s ease;
}
.seg:hover { border-color: var(--gold); color: var(--navy); }
.seg.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.heatmap-wrap { display: flex; gap: 16px; align-items: stretch; }
.heatmap-axis-y {
  writing-mode: vertical-rl; transform: rotate(180deg);
  color: var(--muted); font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.heatmap {
  display: grid;
  grid-template-columns: 60px repeat(5, 1fr);
  grid-template-rows: 40px repeat(5, 70px);
  gap: 4px; flex: 1;
}
.heatmap-axis-x {
  color: var(--muted); font-size: 0.85rem; font-weight: 600;
  text-align: center; margin-top: 8px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.heat-cell {
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 1.05rem;
  border-radius: 4px; transition: transform 0.15s ease;
  position: relative;
}
.heat-cell:hover { transform: scale(1.04); }
.heat-cell.empty { color: rgba(255,255,255,0.5); }
.heat-axis {
  display: grid; place-items: center;
  font-weight: 700; color: var(--navy); background: var(--paper-3);
  border-radius: 4px; font-size: 0.85rem;
}
.heatmap-legend { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.leg {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-2);
}
.leg::before { content: ""; width: 14px; height: 14px; background: var(--c); border-radius: 3px; }

.sub-h3 { color: var(--navy); margin-top: 44px; margin-bottom: 16px; font-family: "Inter", sans-serif; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.table-wrap { background: #fff; border-radius: var(--r-md); border: 1px solid var(--border); overflow: hidden; }
.risk-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.risk-table thead th { background: var(--navy); color: #fff; text-align: left; padding: 14px 16px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; }
.risk-table thead th.num { text-align: center; }
.risk-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.risk-table tbody tr:last-child td { border-bottom: 0; }
.risk-table tbody tr:nth-child(even) { background: var(--paper-3); }
.risk-table .pill {
  display: inline-block; min-width: 36px; text-align: center; color: #fff; font-weight: 700;
  padding: 4px 10px; border-radius: 4px; font-size: 0.85rem;
}
.risk-table .id-col { font-weight: 700; color: var(--navy); }

/* ============= Stakeholders ============= */
.tier {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: 16px; overflow: hidden;
}
.tier-1 { background: var(--navy); color: #fff; border-color: var(--navy); }
.tier-1 .tier-band { padding: 26px 30px; border-left: 6px solid var(--gold); }
.tier-1 h3 { color: #fff; margin: 6px 0 4px; font-size: 1.5rem; }
.tier-1 p { color: rgba(255,255,255,0.86); margin: 0; }
.tier-label {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold);
}
.tier summary {
  list-style: none; cursor: pointer;
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 700; color: var(--navy);
  border-left: 4px solid var(--blue);
  transition: background 0.15s ease;
}
.tier summary::-webkit-details-marker { display: none; }
.tier summary:hover { background: var(--paper-3); }
.tier summary::after {
  content: "+"; color: var(--gold); font-size: 1.4rem; font-weight: 700;
  width: 28px; text-align: center;
}
.tier[open] summary::after { content: "–"; }
.tier-count { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.tier-grid {
  padding: 8px 22px 22px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.entity { background: var(--paper-3); padding: 14px 16px; border-radius: 6px; border-left: 3px solid var(--gold); }
.entity h4 { font-size: 0.85rem; color: var(--navy); margin: 0 0 4px; text-transform: none; letter-spacing: 0; }
.entity p { font-size: 0.85rem; color: var(--text-2); margin: 0; line-height: 1.4; }

/* ============= Roadmap ============= */
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.phase {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 24px; position: relative;
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.phase:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.phase::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent, var(--gold)); border-radius: var(--r-md) var(--r-md) 0 0;
}
.phase header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.phase-tag {
  display: inline-block; padding: 4px 10px; border-radius: 4px;
  background: var(--accent, var(--gold)); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.phase h3 { color: var(--navy); margin: 0; font-size: 1.3rem; font-family: "Playfair Display", Georgia, serif; }
.phase-date { color: var(--gold); font-weight: 700; font-size: 0.85rem; margin-bottom: 12px; }
.phase p { color: var(--text-2); font-size: 0.92rem; flex: 1; }
.gate {
  font-size: 0.82rem; color: var(--navy);
  background: var(--paper-3); padding: 10px 12px; border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0; margin-top: 12px;
}

/* ============= Downloads ============= */
.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.dl {
  display: flex; align-items: center; gap: 18px;
  background: #fff; padding: 22px 24px; border-radius: var(--r-md);
  border: 1px solid var(--border); text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dl:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold); text-decoration: none; }
.dl-ico {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px;
  background: var(--navy); color: var(--gold);
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em;
}
.dl-body { flex: 1; }
.dl-body h3 { color: var(--navy); margin: 0 0 4px; font-size: 1.05rem; }
.dl-body p { color: var(--text-2); margin: 0; font-size: 0.9rem; }
.dl-arrow { color: var(--gold); font-size: 1.6rem; font-weight: 700; }

/* ============= Contact ============= */
.section-contact { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; padding-top: 96px; padding-bottom: 96px; }
.section-contact h2 { color: #fff; }
.section-contact .lede { color: rgba(255,255,255,0.84); }
.light { color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-meta { display: grid; gap: 10px; margin-top: 22px; font-size: 0.95rem; }
.contact-meta strong { color: var(--gold); display: inline-block; min-width: 80px; }
.contact-meta a { color: #fff; text-decoration: underline; text-decoration-color: rgba(212,160,23,0.6); }
.contact-meta a:hover { color: var(--gold); }

.contact-form {
  background: #fff; color: var(--text);
  padding: 32px 32px 28px; border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.contact-form h3 { color: var(--navy); font-family: "Playfair Display", Georgia, serif; font-size: 1.3rem; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; }
.form-grid label span { font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border);
  border-radius: var(--r-sm); font: inherit; color: var(--text);
  background: #fff; transition: border-color 0.18s, box-shadow 0.18s;
}
.form-grid textarea { resize: vertical; min-height: 110px; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,37,69,0.12);
}
.form-grid .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { margin-top: 18px; display: flex; gap: 16px; align-items: center; }
.form-status { font-size: 0.9rem; color: var(--text-2); }
.form-status.ok { color: var(--green); font-weight: 600; }
.form-status.err { color: #EF4444; font-weight: 600; }
.form-note { font-size: 0.78rem; color: var(--muted); margin: 12px 0 0; }

/* ============= Footer ============= */
.footer { background: #0A1F39; color: rgba(255,255,255,0.78); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer h4 { color: var(--gold); font-size: 0.78rem; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; font-size: 0.9rem; line-height: 1.5; }
.footer a { color: rgba(255,255,255,0.78); }
.footer a:hover { color: var(--gold); text-decoration: none; }
.footer .brand-mark { background: var(--gold); color: var(--navy); }
.footer .brand-title { color: #fff; }
.footer .brand-sub { color: rgba(255,255,255,0.66); }
.footer .muted { color: rgba(255,255,255,0.6); font-size: 0.88rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0; font-size: 0.82rem;
}
.footer-bottom .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ============= Responsive ============= */

/* Tablet & narrow laptops (<= 1024px) */
@media (max-width: 1024px) {
  .container { padding: 0 22px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .takeaways, .products, .charts-grid, .alignments, .roadmap, .challenges-grid, .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .benefit-rows, .downloads, .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column;
    padding: 12px; gap: 2px;
    border-bottom: 1px solid var(--border);
    align-items: stretch; box-shadow: var(--shadow-md);
    max-height: calc(100vh - 70px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; border-radius: 6px; font-size: 0.98rem; min-height: 44px; display: flex; align-items: center; }
  .nav .nav-cta { margin: 6px 0 4px; text-align: center; justify-content: center; }
  .nav-toggle { display: flex; }
}

/* Tablets portrait (<= 768px) */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 28px; }
  .hero { padding: 56px 0 64px; }
  h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
  h2 { font-size: clamp(1.45rem, 4.4vw, 1.9rem); }
  .charts-grid, .alignments, .roadmap, .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px; }
  .takeaways, .products, .challenges-grid, .benefit-rows, .downloads, .tier-grid, .footer-grid, .form-grid { grid-template-columns: 1fr !important; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; width: 100%; }
  .summary-card { padding: 22px; font-size: 0.98rem; }
  .figures { grid-template-columns: 1fr 1fr; gap: 12px; }
  .figure-num { font-size: 1.3rem; }
  .figure-label { font-size: 0.72rem; }
  .hero-card { padding: 22px; }
  .cultural { flex-direction: column; align-items: flex-start; padding: 24px; }
  .cultural-icon { width: 52px; height: 52px; font-size: 1.5rem; }
  .footer-grid { gap: 28px; }
}

/* Mobile portrait (<= 640px) */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 18px; }
  .section { padding: 52px 0; }
  .hero { padding: 44px 0 56px; }
  .topbar-inner { padding: 10px 18px; }
  .brand-mark { width: 36px; height: 36px; font-size: 20px; }
  .brand-title { font-size: 0.95rem; }
  .brand-sub { font-size: 0.7rem; }

  .charts-grid, .alignments, .roadmap, .kpi-grid, .figures,
  .takeaways, .products, .challenges-grid, .benefit-rows,
  .downloads, .tier-grid, .footer-grid, .form-grid { grid-template-columns: 1fr !important; }

  .kpi { padding: 22px 18px; }
  .kpi-value { font-size: 1.35rem; }
  .summary-card { padding: 20px; border-left-width: 4px; }
  .chart-wrap { height: 240px; }

  .heatmap-wrap { gap: 8px; }
  .heatmap-axis-y { font-size: 0.7rem; }
  .heatmap {
    grid-template-columns: 32px repeat(5, 1fr);
    grid-template-rows: 28px repeat(5, 52px);
    gap: 3px;
  }
  .heat-cell { font-size: 0.85rem; border-radius: 3px; }
  .heat-axis { font-size: 0.72rem; }

  .heatmap-controls { flex-direction: column; gap: 8px; }
  .seg { width: 100%; text-align: center; padding: 12px 16px; }

  .risk-table thead th:last-child,
  .risk-table tbody td:last-child { display: none; }
  .risk-table thead th,
  .risk-table tbody td { padding: 10px 10px; font-size: 0.85rem; }
  .risk-table thead th { font-size: 0.72rem; }

  .tier-1 .tier-band { padding: 22px; }
  .tier-1 h3 { font-size: 1.2rem; }
  .tier summary { padding: 16px; gap: 10px; flex-wrap: wrap; }
  .tier-grid { padding: 4px 14px 14px; gap: 10px; }

  .phase { padding: 20px; }
  .phase header { gap: 10px; }
  .phase h3 { font-size: 1.15rem; }

  .dl { padding: 16px 18px; gap: 14px; }
  .dl-ico { width: 52px; height: 52px; font-size: 0.78rem; }
  .dl-body h3 { font-size: 0.98rem; }
  .dl-body p { font-size: 0.82rem; }

  .section-contact { padding-top: 64px; padding-bottom: 64px; }
  .contact-form { padding: 22px; }
  .contact-meta { font-size: 0.9rem; }
  .contact-meta strong { min-width: 0; margin-right: 8px; }

  .footer-bottom .container { flex-direction: column; align-items: flex-start; gap: 6px; }

  .btn { width: 100%; padding: 14px 22px; }
  .hero-cta { width: 100%; }

  .nav a { min-height: 48px; }

  .hero-card { padding: 18px; }
  .lede { font-size: 1rem; }

  .cultural { padding: 22px; }
  .cultural h3 { font-size: 0.98rem; }

  .instances { padding: 22px; }
  .instance-list { gap: 12px; flex-direction: column; }

  body { padding-left: env(safe-area-inset-left, 0); padding-right: env(safe-area-inset-right, 0); }
  .topbar-inner { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .footer-bottom { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* Very narrow phones (<= 380px) */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  h1 { font-size: 1.65rem; }
  .figures { grid-template-columns: 1fr; }
  .heatmap { grid-template-rows: 26px repeat(5, 44px); }
  .heat-cell { font-size: 0.78rem; }
  .brand-text .brand-sub { display: none; }
}

/* Print-friendly */
@media print {
  .topbar, .nav-toggle, .hero-cta, .contact-form, .heatmap-controls, .footer-bottom { display: none; }
  body { font-size: 11pt; }
  .section { padding: 24px 0; page-break-inside: avoid; }
  .section-alt { background: #fff; }
}

/* ============= Role-based access (Cloudflare Access) ============= */
/* Identity badge in topbar */
.identity-badge {
  display: none; align-items: center; gap: 10px;
  margin-left: 12px; padding: 6px 10px;
  background: var(--paper-3); border: 1px solid var(--border);
  border-radius: 999px; font-size: 0.78rem;
}
.identity-badge.visible { display: inline-flex; }
.ib-role {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  font-weight: 700; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--gold); color: var(--navy);
}
.ib-role-admin   { background: #991B1B; color: #fff; }
.ib-role-reviewer{ background: var(--blue); color: #fff; }
.ib-role-viewer  { background: var(--muted); color: #fff; }
.ib-name { color: var(--text-2); font-weight: 600; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-out  { color: var(--muted); font-weight: 600; text-decoration: none; padding-left: 8px; border-left: 1px solid var(--border); }
.ib-out:hover { color: var(--red); text-decoration: none; }

/* Hide role-restricted content until JS has applied data-role.
   Elements default to hidden then are revealed by matching rules below. */
body:not([data-role]) .admin-only,
body:not([data-role]) .reviewer-plus,
body:not([data-role]) .viewer-plus { visibility: hidden; }

/* viewer = lowest tier */
body[data-role="viewer"] .admin-only,
body[data-role="viewer"] .reviewer-plus { display: none !important; }

/* reviewer = mid tier - sees reviewer-plus but not admin-only */
body[data-role="reviewer"] .admin-only { display: none !important; }

/* admin = top tier - sees everything */

/* Reveal once role is known */
body[data-role] .admin-only,
body[data-role] .reviewer-plus,
body[data-role] .viewer-plus { visibility: visible; }

/* Role-locked notice on download tiles */
.dl.locked {
  opacity: 0.55; pointer-events: none; position: relative;
}
.dl.locked::after {
  content: "Locked"; position: absolute; top: 12px; right: 14px;
  background: var(--muted); color: #fff; font-size: 0.66rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* Role banner above downloads grid (informational) */
.role-banner {
  background: var(--paper-3); border-left: 4px solid var(--gold);
  padding: 14px 18px; margin-bottom: 18px; border-radius: 0 6px 6px 0;
  color: var(--text-2); font-size: 0.92rem;
}
.role-banner strong { color: var(--navy); }

body[data-role="admin"]    .role-banner::before { content: "Administrator view — "; color: #991B1B; font-weight: 700; }
body[data-role="reviewer"] .role-banner::before { content: "Reviewer view — ";      color: var(--blue);  font-weight: 700; }
body[data-role="viewer"]   .role-banner::before { content: "Public view — ";        color: var(--muted); font-weight: 700; }

/* Identity badge responsive: hide name on mobile, keep role + sign out */
@media (max-width: 768px) {
  .identity-badge { margin-left: 0; margin-right: 8px; padding: 4px 8px; gap: 6px; }
  .ib-name { display: none; }
  .ib-out { padding-left: 6px; }
}

/* ============= Admin: Manage Users modal ============= */
/* Trigger button in topbar (admin-only) */
.manage-btn {
  display: none;
  align-items: center; gap: 6px;
  background: var(--gold); color: var(--navy);
  border: 0; border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 0.82rem;
  cursor: pointer; transition: all 0.18s ease;
  margin-left: 8px;
  letter-spacing: 0.02em;
}
.manage-btn:hover { background: var(--navy); color: var(--gold); }
.manage-btn::before { content: "⚙"; font-size: 0.95rem; }
body[data-role="admin"] .manage-btn { display: inline-flex; }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11, 37, 69, 0.62);
  backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 5vh 16px 24px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.modal {
  width: 100%; max-width: 760px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  animation: modalIn 0.18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-head {
  background: var(--navy); color: #fff;
  padding: 22px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modal-head h2 { color: #fff; font-family: "Playfair Display", Georgia, serif; font-size: 1.4rem; margin: 0; }
.modal-head .sub { color: var(--gold); font-size: 0.82rem; margin-top: 4px; letter-spacing: 0.04em; }
.modal-close {
  background: transparent; border: 0; color: #fff;
  font-size: 1.6rem; line-height: 1; padding: 4px 10px;
  cursor: pointer; border-radius: 6px;
}
.modal-close:hover { background: rgba(255,255,255,0.12); }

.modal-body { padding: 0; }

/* Tabs */
.modal-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--paper-3);
}
.modal-tab {
  flex: 1; padding: 14px 16px; background: transparent; border: 0;
  font-weight: 700; font-size: 0.92rem; color: var(--text-2);
  cursor: pointer; border-bottom: 3px solid transparent;
}
.modal-tab.active { color: var(--navy); border-bottom-color: var(--gold); background: #fff; }
.modal-tab .count {
  display: inline-block; margin-left: 6px; padding: 1px 8px;
  background: var(--ice); color: var(--text-2); border-radius: 999px;
  font-size: 0.74rem; font-weight: 600;
}
.modal-tab.active .count { background: var(--gold); color: var(--navy); }

.tab-panel { display: none; padding: 18px 24px; }
.tab-panel.active { display: block; }

.panel-help {
  font-size: 0.85rem; color: var(--text-2); margin: 0 0 14px;
  padding: 10px 12px; background: var(--paper-3);
  border-left: 3px solid var(--gold); border-radius: 0 6px 6px 0;
}
.panel-help code {
  background: rgba(11,37,69,0.06); padding: 1px 6px; border-radius: 3px;
  font-size: 0.85em; color: var(--navy);
}

.entry-add {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.entry-add input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 6px; font: inherit;
}
.entry-add input:focus { outline: 0; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,37,69,0.10); }
.entry-add .btn-add {
  background: var(--navy); color: #fff; border: 0;
  padding: 10px 18px; border-radius: 6px; font-weight: 700;
  cursor: pointer; font-size: 0.9rem;
}
.entry-add .btn-add:hover { background: var(--gold); color: var(--navy); }
.entry-add .btn-add:disabled { background: var(--muted); cursor: not-allowed; opacity: 0.7; }

.entry-error {
  display: none;
  margin: -6px 0 12px;
  color: #991B1B; font-size: 0.84rem; font-weight: 600;
}
.entry-error.visible { display: block; }

.entry-list {
  list-style: none; padding: 0; margin: 0;
  max-height: 260px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px;
}
.entry-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.entry-list li:last-child { border-bottom: 0; }
.entry-list li:nth-child(even) { background: var(--paper-3); }
.entry-list .entry-text { flex: 1; color: var(--text); font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; }
.entry-list .entry-kind {
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--ice); color: var(--text-2);
}
.entry-list .entry-kind.domain { background: var(--blue-soft); color: var(--blue); }
.entry-list .entry-kind.email  { background: var(--gold-soft); color: #7a5e10; }
.entry-list .entry-remove {
  background: transparent; border: 0; color: var(--muted);
  font-size: 1.2rem; cursor: pointer; padding: 2px 8px; border-radius: 4px;
}
.entry-list .entry-remove:hover { color: #fff; background: #EF4444; }
.entry-empty { padding: 18px; text-align: center; color: var(--muted); font-style: italic; }

.modal-foot {
  padding: 16px 24px;
  background: var(--paper-3);
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end;
}
.modal-foot .save-state {
  margin-right: auto;
  font-size: 0.82rem; color: var(--muted);
}
.modal-foot .save-state.saved { color: var(--green); font-weight: 600; }
.modal-foot button {
  padding: 9px 16px; border-radius: 6px; font-weight: 600; font-size: 0.88rem;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  cursor: pointer; transition: all 0.15s ease;
}
.modal-foot button:hover { border-color: var(--navy); color: var(--navy); }
.modal-foot .btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.modal-foot .btn-primary:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.modal-foot .btn-warn { color: #991B1B; }
.modal-foot .btn-warn:hover { background: #991B1B; color: #fff; border-color: #991B1B; }

/* Mobile responsive modal */
@media (max-width: 640px) {
  .modal-overlay { padding: 2vh 8px 16px; }
  .modal-head { padding: 18px 20px; }
  .modal-head h2 { font-size: 1.15rem; }
  .tab-panel { padding: 14px 16px; }
  .entry-add { flex-direction: column; }
  .entry-add .btn-add { width: 100%; }
  .modal-foot { padding: 14px 16px; }
  .modal-foot button { flex: 1; min-width: 120px; }
  .manage-btn { margin-left: 4px; padding: 6px 10px; font-size: 0.75rem; }
}
