/* ===================================================================
   TASCMA - Tanzania Artisanal & Small-Scale Critical Minerals Association
   Official Institutional Design System & Stylesheet
   Design Ethos: Authoritative, Editorial, Legally Grounded, High-Contrast
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Institutional Palette - Navy, Bronze & Mineral Slate */
  --tascma-navy-dark: #080d1a;
  --tascma-navy-surface: #0e1726;
  --tascma-navy-card: #131f33;
  --tascma-navy-card-hover: #182842;
  --tascma-navy-border: #1e2f4d;
  --tascma-navy-divider: rgba(255, 255, 255, 0.08);

  /* Mineral Accents (Refined & Non-Neon) */
  --tascma-copper-deep: #9a4c07;
  --tascma-copper: #c26d1a;
  --tascma-copper-bright: #e08324;
  --tascma-copper-subtle: rgba(194, 109, 26, 0.12);
  --tascma-copper-border: rgba(194, 109, 26, 0.35);

  --tascma-cobalt: #1d4ed8;
  --tascma-cobalt-subtle: rgba(29, 78, 216, 0.12);
  --tascma-cobalt-border: rgba(29, 78, 216, 0.35);

  --tascma-emerald: #059669;
  --tascma-emerald-subtle: rgba(5, 150, 105, 0.12);
  --tascma-emerald-border: rgba(5, 150, 105, 0.35);

  --tascma-crimson: #dc2626;
  --tascma-crimson-subtle: rgba(220, 38, 38, 0.1);

  /* Typography */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-lift: 0 12px 32px rgba(0, 0, 0, 0.35);

  /* Transitions */
  --transition-fast: 0.18s ease;
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================================================
   Reset & Base Standards
   =================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--tascma-navy-dark);
  color: var(--text-primary);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  background-color: var(--tascma-navy-dark);
  background-image: 
    linear-gradient(to bottom, rgba(8, 13, 26, 0.95), rgba(8, 13, 26, 0.98)),
    radial-gradient(ellipse at 80% 0%, rgba(194, 109, 26, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 50%, rgba(29, 78, 216, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  font-weight: 700;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

p, span, a, label {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* Ensure grid items and cards never blow out their containers */
.hero-grid > *,
.calc-grid > *,
.esg-feature-grid > *,
.contact-layout > *,
.explorer-body > *,
.grid-3 > *,
.grid-2 > *,
.pathway-grid > *,
.prohibitions-matrix > *,
.organogram-wrap > *,
.footer-grid > *,
.card,
.doc-row,
.hero-visual-card,
.hero-media-block,
.esg-photo-card,
.zone-display-panel,
.calc-card,
.esg-panel {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* ===================================================================
   Top Institutional Banner & Header
   =================================================================== */
.gov-top-bar {
  background: #050811;
  border-bottom: 1px solid var(--tascma-navy-divider);
  padding: 0.45rem 0;
  font-size: 0.775rem;
  color: var(--text-muted);
}

.gov-top-bar .gov-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gov-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
}

.gov-status-pill .indicator-dot {
  width: 6px;
  height: 6px;
  background: var(--tascma-emerald);
  border-radius: 50%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 13, 26, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tascma-navy-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.85rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.brand-emblem {
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, var(--tascma-copper), var(--tascma-copper-deep));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.brand-emblem svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.685rem;
  font-weight: 600;
  color: var(--tascma-copper-bright);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 0.35rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--tascma-copper);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Language Switcher */
.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.lang-toggle-btn:hover {
  border-color: var(--tascma-copper);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.4rem;
  transition: all var(--transition-smooth);
  word-break: break-word;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--tascma-copper);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: var(--tascma-copper-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(194, 109, 26, 0.3);
}

.btn-secondary {
  background: var(--tascma-navy-card);
  color: var(--text-primary);
  border: 1px solid var(--tascma-navy-border);
}

.btn-secondary:hover {
  background: var(--tascma-navy-card-hover);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-outline-copper {
  border: 1px solid var(--tascma-copper);
  color: var(--tascma-copper-bright);
  background: var(--tascma-copper-subtle);
}

.btn-outline-copper:hover {
  background: var(--tascma-copper);
  color: #ffffff;
}

/* ===================================================================
   Audience Lens Switcher Bar (Dual Audience)
   =================================================================== */
.lens-bar {
  background: #0b1120;
  border-bottom: 1px solid var(--tascma-navy-border);
  padding: 0.75rem 0;
}

.lens-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.lens-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.lens-info svg {
  width: 18px;
  height: 18px;
  color: var(--tascma-copper);
}

.lens-selector {
  display: inline-flex;
  background: var(--tascma-navy-dark);
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--tascma-navy-border);
}

.lens-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0.35rem;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.lens-btn svg {
  width: 16px;
  height: 16px;
}

.lens-btn:hover {
  color: #fff;
}

.lens-btn.active {
  background: var(--tascma-copper);
  color: #ffffff;
}

.lens-btn.active.lens-buyer {
  background: var(--tascma-cobalt);
}

/* ===================================================================
   Hero Section
   =================================================================== */
.hero {
  padding: 3.25rem 0 3.5rem;
  border-bottom: 1px solid var(--tascma-navy-divider);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-motto-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  background: var(--tascma-copper-subtle);
  border: 1px solid var(--tascma-copper-border);
  border-radius: 0.3rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--tascma-copper-bright);
  margin-bottom: 1.25rem;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: 3.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.hero-title .copper-accent {
  color: var(--tascma-copper-bright);
}

.hero-description {
  font-size: 1.075rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.75rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tascma-navy-divider);
}

.metric-col .metric-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.metric-col .metric-label {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

/* Hero Visual Card */
.hero-media-block {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.hero-visual-card {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--tascma-navy-border);
  background: var(--tascma-navy-surface);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.hero-visual-card img {
  width: 100%;
  max-width: 100%;
  height: 410px;
  object-fit: cover;
  display: block;
}

.hero-visual-caption {
  padding: 1.25rem;
  background: var(--tascma-navy-surface);
  border-top: 1px solid var(--tascma-navy-border);
}

.hero-visual-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
}

.hero-visual-text {
  font-size: 0.825rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ===================================================================
   Sections Common
   =================================================================== */
.section-pad {
  padding: 3.75rem 0;
  border-bottom: 1px solid var(--tascma-navy-divider);
}

.section-pad.surface-bg {
  background: var(--tascma-navy-surface);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tascma-copper-bright);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.section-title {
  font-size: 2.25rem;
  color: #ffffff;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-tertiary);
  line-height: 1.65;
}

/* ===================================================================
   Feature Cards & Grids
   =================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.card {
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.65rem;
  padding: 2rem;
  transition: all var(--transition-smooth);
}

.card:hover {
  background: var(--tascma-navy-card-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.card-icon-box {
  width: 3rem;
  height: 3rem;
  border-radius: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-icon-box svg {
  width: 22px;
  height: 22px;
}

.card-icon-box.copper {
  background: var(--tascma-copper-subtle);
  border: 1px solid var(--tascma-copper-border);
  color: var(--tascma-copper-bright);
}

.card-icon-box.cobalt {
  background: var(--tascma-cobalt-subtle);
  border: 1px solid var(--tascma-cobalt-border);
  color: #60a5fa;
}

.card-icon-box.emerald {
  background: var(--tascma-emerald-subtle);
  border: 1px solid var(--tascma-emerald-border);
  color: #34d399;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===================================================================
   Formalization Pathway (Article 8A Timeline)
   =================================================================== */
.pathway-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.pathway-step {
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.65rem;
  padding: 1.75rem 1.5rem;
  position: relative;
  transition: all var(--transition-smooth);
}

.pathway-step:hover {
  border-color: var(--tascma-copper);
  transform: translateY(-2px);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--tascma-copper-subtle);
  color: var(--tascma-copper-bright);
  border: 1px solid var(--tascma-copper-border);
  border-radius: 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.step-window {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.8px;
}

.step-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0.35rem 0 0.5rem;
}

.step-details {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  line-height: 1.55;
}

/* ===================================================================
   Tables (Statutory & Financial)
   =================================================================== */
.table-container {
  overflow-x: auto;
  border-radius: 0.65rem;
  border: 1px solid var(--tascma-navy-border);
  background: var(--tascma-navy-card);
  margin-top: 1.5rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: rgba(8, 13, 26, 0.75);
  padding: 1.15rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  color: #ffffff;
  border-bottom: 1px solid var(--tascma-navy-border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 1.15rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--tascma-navy-divider);
  vertical-align: top;
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
}

.tag-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-badge.copper {
  background: var(--tascma-copper-subtle);
  color: var(--tascma-copper-bright);
  border: 1px solid var(--tascma-copper-border);
}

.tag-badge.emerald {
  background: var(--tascma-emerald-subtle);
  color: #34d399;
  border: 1px solid var(--tascma-emerald-border);
}

/* ===================================================================
   Interactive Minerals & 6 Zones Explorer (Rule 3 & 5)
   =================================================================== */
.explorer-card {
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.explorer-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 1.75rem;
  background: rgba(8, 13, 26, 0.8);
  border-bottom: 1px solid var(--tascma-navy-border);
}

.filter-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 0.35rem;
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  color: var(--text-tertiary);
  font-size: 0.825rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  border-color: var(--tascma-copper);
  color: #fff;
}

.filter-chip.active {
  background: var(--tascma-copper);
  color: #ffffff;
  border-color: var(--tascma-copper-bright);
}

.explorer-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  padding: 2rem;
  gap: 2.5rem;
}

.zone-display-panel {
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.5rem;
  padding: 1.75rem;
}

.zone-meta-status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background: var(--tascma-cobalt-subtle);
  border: 1px solid var(--tascma-cobalt-border);
  color: #60a5fa;
  border-radius: 0.25rem;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.zone-display-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.zone-display-hq {
  font-size: 0.875rem;
  color: var(--tascma-copper-bright);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.zone-minerals-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.mineral-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.3rem 0.7rem;
  border-radius: 0.25rem;
  font-size: 0.825rem;
  font-weight: 600;
}

.zone-selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.zone-nav-item {
  text-align: left;
  padding: 1rem 1.25rem;
  border-radius: 0.45rem;
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  transition: all var(--transition-fast);
}

.zone-nav-item:hover,
.zone-nav-item.active {
  background: var(--tascma-navy-card);
  border-color: var(--tascma-copper);
}

.zone-nav-item .zone-nav-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 0.95rem;
  display: block;
}

.zone-nav-item .zone-nav-details {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ===================================================================
   Revolving Fund Microfinance Calculator (Rule 13 & 15)
   =================================================================== */
.calc-card {
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.75rem;
  padding: 2.5rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.calc-product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.calc-tab {
  padding: 0.5rem 1rem;
  border-radius: 0.35rem;
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  color: var(--text-tertiary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.calc-tab:hover {
  border-color: var(--tascma-copper);
  color: #fff;
}

.calc-tab.active {
  background: var(--tascma-copper);
  color: #ffffff;
  border-color: var(--tascma-copper-bright);
}

.slider-group {
  margin-bottom: 1.75rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.slider-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

.slider-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tascma-copper-bright);
}

.custom-range {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  -webkit-appearance: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tascma-copper-bright);
  cursor: pointer;
  border: 2px solid #ffffff;
}

.calc-result-panel {
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.65rem;
  padding: 2.25rem;
  text-align: center;
}

.calc-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  font-weight: 600;
}

.calc-repay-amount {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0.4rem 0 1.5rem;
}

.calc-ledger {
  border-top: 1px solid var(--tascma-navy-divider);
  padding-top: 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.ledger-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.ledger-line span:first-child {
  color: var(--text-tertiary);
}

.ledger-line span:last-child {
  color: #ffffff;
  font-weight: 600;
}

/* ===================================================================
   Track B: ESG & Traceability Architecture
   =================================================================== */
.esg-panel {
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.75rem;
  padding: 2.75rem;
}

.esg-feature-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.esg-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin: 1.75rem 0;
}

.esg-checklist li {
  display: flex;
  gap: 0.85rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.esg-checklist svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--tascma-emerald);
  margin-top: 2px;
}

/* Prohibitions Matrix (Article 30) */
.prohibitions-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.prohibition-box {
  background: var(--tascma-crimson-subtle);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: left;
}

.prohibition-box .box-icon {
  width: 2rem;
  height: 2rem;
  color: #f87171;
  margin-bottom: 0.75rem;
}

.prohibition-box .box-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 0.35rem;
}

.prohibition-box .box-desc {
  font-size: 0.825rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ===================================================================
   Official Governance Organogram
   =================================================================== */
.organogram-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.tier-card {
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.65rem;
  padding: 2rem;
}

.tier-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--tascma-navy-divider);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tier-item {
  margin-bottom: 1.15rem;
}

.tier-item:last-child {
  margin-bottom: 0;
}

.tier-role {
  font-size: 0.925rem;
  font-weight: 700;
  color: #ffffff;
}

.tier-detail {
  font-size: 0.825rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* ===================================================================
   Document Resource Center & Interactive Form Viewer
   =================================================================== */
.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.75rem;
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  transition: all var(--transition-fast);
}

.doc-row:hover {
  border-color: var(--tascma-copper);
  background: var(--tascma-navy-card-hover);
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.doc-badge-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.4rem;
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--tascma-copper-bright);
}

.doc-badge-icon.emerald {
  color: #34d399;
}

.doc-badge-icon.cobalt {
  color: #60a5fa;
}

.doc-title {
  font-weight: 700;
  font-size: 0.975rem;
  color: #ffffff;
}

.doc-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================================================================
   Contact & Statutory Notice Submission
   =================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.4rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--tascma-copper);
  box-shadow: 0 0 0 2px rgba(194, 109, 26, 0.2);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* ===================================================================
   Official Modal Dialog
   =================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-container {
  background: var(--tascma-navy-surface);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.75rem;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lift);
}

.modal-head {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--tascma-navy-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  color: #ffffff;
}

.modal-close {
  color: var(--text-tertiary);
  font-size: 1.5rem;
  line-height: 1;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 2rem;
}

.statutory-paper {
  background: #ffffff;
  color: #1e293b;
  padding: 2.25rem;
  border-radius: 0.4rem;
  font-size: 0.875rem;
  line-height: 1.6;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.statutory-paper h3,
.statutory-paper h4 {
  color: #0f172a;
}

/* Footer */
.site-footer {
  background: #050812;
  border-top: 1px solid var(--tascma-navy-border);
  padding: 4.5rem 0 2rem;
  color: var(--text-tertiary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-heading {
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link-list a {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.footer-link-list a:hover {
  color: var(--tascma-copper-bright);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--tascma-navy-divider);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Toast */
.sys-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-copper);
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: 0.4rem;
  box-shadow: var(--shadow-lift);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 2000;
  display: none;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===================================================================
   Mobile Navigation Drawer Styles
   =================================================================== */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0.4rem;
  background: var(--tascma-navy-card);
  border: 1px solid var(--tascma-navy-border);
  border-radius: 0.375rem;
  cursor: pointer;
  z-index: 101;
}

.mobile-nav-toggle .bar {
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-nav-toggle.open .bar-1 {
  transform: rotate(45deg) translate(4px, 5px);
}

.mobile-nav-toggle.open .bar-2 {
  opacity: 0;
}

.mobile-nav-toggle.open .bar-3 {
  transform: rotate(-45deg) translate(4px, -5px);
}

.mobile-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(8, 13, 26, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tascma-navy-border);
  padding: 1.25rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-lift);
  z-index: 99;
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.mobile-nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--tascma-navy-divider);
  display: block;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  color: var(--tascma-copper-bright);
}

.docs-stack {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.doc-actions-wrap {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.group-discount-box {
  background: rgba(8, 13, 26, 0.6);
  border: 1px solid var(--tascma-navy-border);
  padding: 0.85rem 1rem;
  border-radius: 0.4rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: #ffffff;
}

.zone-role-box {
  background: rgba(8, 13, 26, 0.6);
  padding: 1rem;
  border-radius: 0.4rem;
  border: 1px solid var(--tascma-navy-border);
}

.zone-meta-label {
  font-size: 0.775rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.zone-meta-val {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.esg-photo-card {
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--tascma-navy-border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* ===================================================================
   Responsive Mobile Breakpoints
   =================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .calc-grid,
  .esg-feature-grid,
  .contact-layout,
  .explorer-body {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .prohibitions-matrix {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .organogram-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-contact-btn {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .gov-top-bar .gov-hq-text {
    display: none;
  }

  .gov-status-pill {
    font-size: 0.725rem;
    line-height: 1.4;
  }

  .lens-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .lens-selector {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.35rem;
  }

  .lens-btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    white-space: normal;
    text-align: center;
  }

  .hero {
    padding: 2rem 0 2.5rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.2;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  .hero-media-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .hero-visual-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-visual-card img {
    height: 220px;
    width: 100%;
    max-width: 100%;
    object-fit: cover;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .metric-col .metric-number {
    font-size: 1.35rem;
  }

  .metric-col .metric-label {
    font-size: 0.685rem;
  }

  .section-pad {
    padding: 2.5rem 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .prohibitions-matrix {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .explorer-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .explorer-filter-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 1rem;
    scrollbar-width: thin;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .filter-chip {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .explorer-body {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem;
    gap: 1.5rem;
  }

  .zone-display-panel {
    padding: 1.25rem 1rem;
    min-width: 0;
  }

  .pathway-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calc-card {
    padding: 1.5rem 1rem;
    min-width: 0;
    overflow: hidden;
  }

  .calc-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    min-width: 0;
  }

  .calc-product-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .calc-tab {
    text-align: center;
    padding: 0.6rem 0.35rem;
    font-size: 0.785rem;
    white-space: normal;
  }

  .slider-group {
    width: 100%;
  }

  .custom-range {
    width: 100%;
  }

  .calc-result-panel {
    width: 100%;
    min-width: 0;
  }

  .calc-repay-amount {
    font-size: 1.85rem;
  }

  .esg-panel {
    padding: 1.5rem 1rem;
    min-width: 0;
    overflow: hidden;
  }

  .esg-feature-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    min-width: 0;
  }

  .esg-photo-card {
    min-width: 0;
    overflow: hidden;
  }

  .esg-photo-card img {
    height: 220px;
    width: 100%;
    max-width: 100%;
    object-fit: cover;
  }

  .docs-stack {
    width: 100%;
    max-width: 100%;
  }

  .doc-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.15rem 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .doc-info {
    min-width: 0;
    width: 100%;
  }

  .doc-text-meta {
    min-width: 0;
    width: 100%;
  }

  .doc-title {
    font-size: 0.95rem;
  }

  .doc-actions-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .doc-actions-wrap .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
    white-space: normal;
    text-align: center;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .form-input {
    font-size: 16px; /* Prevents iOS auto-zoom */
    width: 100%;
    max-width: 100%;
  }

  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-container {
    width: 100%;
    max-width: calc(100vw - 1rem);
    max-height: 92vh;
    margin: 0.5rem auto;
    border-radius: 0.5rem;
  }

  .modal-head {
    padding: 0.85rem 1rem;
  }

  .modal-body {
    padding: 0.85rem 0.75rem;
  }

  .statutory-paper {
    padding: 1rem 0.75rem;
    font-size: 0.825rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .calc-card {
    padding: 1.25rem 0.75rem;
  }

  .calc-product-tabs {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .calc-tab {
    width: 100%;
    padding: 0.65rem 0.5rem;
    font-size: 0.825rem;
  }

  .slider-labels {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .group-discount-box {
    padding: 0.75rem 0.65rem;
    font-size: 0.775rem;
    line-height: 1.35;
  }

  .calc-result-panel {
    padding: 1.25rem 0.75rem;
  }

  .calc-repay-amount {
    font-size: 1.65rem;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 0.65rem;
  }

  .brand-emblem {
    width: 2.25rem;
    height: 2.25rem;
  }

  .brand-logo {
    gap: 0.5rem;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-subtitle {
    font-size: 0.6rem;
  }
}

/* Print Stylesheet for Statutory Forms */
@media print {
  body * {
    visibility: hidden;
  }
  .modal-overlay.open,
  .modal-overlay.open .statutory-paper,
  .modal-overlay.open .statutory-paper * {
    visibility: visible;
  }
  .modal-overlay.open {
    position: absolute;
    left: 0;
    top: 0;
    background: transparent;
    padding: 0;
  }
  .modal-container {
    border: none;
    box-shadow: none;
    max-width: 100%;
  }
  .modal-head,
  .modal-close,
  .print-btn-bar {
    display: none !important;
  }
  .statutory-paper {
    padding: 0;
    box-shadow: none;
  }
}

