:root {
  --ecosystem-page-bg: #ffffff;
  --ecosystem-surface: #ffffff;
  --ecosystem-soft-surface: #f8fafc;
  --ecosystem-border: #d8dee8;
  --ecosystem-ink: #18212f;
  --ecosystem-muted: #5b6472;
  --ecosystem-footer: #111827;
  --ecosystem-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --ecosystem-radius: 8px;
}

html { background: var(--ecosystem-page-bg); }

body {
  color: var(--ecosystem-ink);
  background: var(--ecosystem-page-bg) !important;
  accent-color: var(--service-primary);
}

main,
.section { background: transparent; }

.navbar,
nav {
  background: var(--ecosystem-surface);
  color: var(--ecosystem-ink);
  border-bottom: 1px solid var(--ecosystem-border);
}

.nav-link,
.navlinks a,
a { color: inherit; }

.nav-container,
.container,
.wrap {
  width: min(1200px, calc(100% - 40px));
  margin-inline: auto;
}

.logo,
.btn,
.button.primary,
.cta-button.primary {
  background: var(--service-primary);
  border-color: var(--service-primary);
  color: #ffffff;
}

.nav-btn,
.button,
.cta-button,
.btn-secondary {
  border-color: var(--ecosystem-border);
}

.card,
.cert-card,
.panel,
.auth-card,
.compliance-card,
.security-card,
.privacy-card,
.feature-card,
.usecase-card,
.pricing-card,
.module-card,
.dashboard-card,
.fusion-action-form,
.calibration-guide,
.calibration-results,
.calibration-diagnosis {
  background: var(--ecosystem-surface);
  color: var(--ecosystem-ink);
  border-color: var(--ecosystem-border);
  border-radius: var(--ecosystem-radius);
  box-shadow: var(--ecosystem-shadow);
}

.card p,
.cert-card p,
.panel p,
.section-subtitle,
.hero-subtitle,
.lead,
.muted,
.footer-tagline {
  color: var(--ecosystem-muted);
}

.hero,
header.hero {
  background: var(--ecosystem-surface) !important;
  color: var(--ecosystem-ink) !important;
  border-bottom: 1px solid var(--ecosystem-border);
  padding-block: clamp(44px, 7vw, 78px);
}

.hero h1,
.hero h2,
.hero h3,
.hero p,
.hero .hero-title,
.hero .hero-subtitle {
  color: var(--ecosystem-ink) !important;
}

.hero .highlight,
.highlight,
.section-title i,
.card h3,
.cert-card h3,
.footer-col h4,
.kicker {
  color: var(--service-primary) !important;
}

.hero .badge,
.badge {
  color: var(--service-primary);
  background: color-mix(in srgb, var(--service-primary) 10%, #ffffff);
  border-color: color-mix(in srgb, var(--service-primary) 35%, transparent);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.stat {
  background: var(--ecosystem-soft-surface);
  border: 1px solid var(--ecosystem-border);
  border-radius: var(--ecosystem-radius);
  padding: 14px 18px;
  min-width: 128px;
}

.stat-number {
  color: var(--service-primary);
  font-weight: 800;
  font-size: 1.35rem;
}

.stat-label {
  color: var(--ecosystem-muted);
  font-size: 0.9rem;
}

.certificate-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.cta-container,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.band {
  background: linear-gradient(135deg, var(--service-primary) 0%, var(--service-secondary) 100%);
  color: #ffffff;
}

.band h1,
.band h2,
.band h3,
.band p { color: #ffffff; }

input,
select,
textarea {
  background: #ffffff;
  color: var(--ecosystem-ink);
  border-color: var(--ecosystem-border);
}

.footer,
footer {
  background: var(--ecosystem-footer);
  color: #f8fafc;
}

.footer a,
.footer-link,
.footer-col a,
footer a,
.footer-tagline { color: #d8dee8; }

body.dark-mode {
  --ecosystem-page-bg: #0f141c;
  --ecosystem-surface: #151b23;
  --ecosystem-soft-surface: #101923;
  --ecosystem-border: #334155;
  --ecosystem-ink: #f1f5f9;
  --ecosystem-muted: #cbd5e1;
  --ecosystem-footer: #090d14;
  --ecosystem-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
  background: var(--ecosystem-page-bg) !important;
  color: var(--ecosystem-ink);
}

body.dark-mode .navbar,
body.dark-mode nav,
body.dark-mode .hero,
body.dark-mode header.hero,
body.dark-mode .card,
body.dark-mode .cert-card,
body.dark-mode .panel,
body.dark-mode .auth-card,
body.dark-mode .compliance-card,
body.dark-mode .security-card,
body.dark-mode .privacy-card,
body.dark-mode .feature-card,
body.dark-mode .usecase-card,
body.dark-mode .pricing-card,
body.dark-mode .module-card,
body.dark-mode .dashboard-card,
body.dark-mode .fusion-action-form,
body.dark-mode .calibration-guide,
body.dark-mode .calibration-results,
body.dark-mode .calibration-diagnosis {
  background: var(--ecosystem-surface) !important;
  color: var(--ecosystem-ink) !important;
  border-color: var(--ecosystem-border);
  box-shadow: var(--ecosystem-shadow);
}

body.dark-mode main,
body.dark-mode .section {
  background: transparent;
  color: var(--ecosystem-ink);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode .section-title,
body.dark-mode .card h2,
body.dark-mode .card h3,
body.dark-mode .cert-card h3,
body.dark-mode .hero h1,
body.dark-mode .hero h2,
body.dark-mode .hero h3,
body.dark-mode .hero p,
body.dark-mode .hero .hero-title,
body.dark-mode .hero .hero-subtitle {
  color: var(--ecosystem-ink) !important;
}

body.dark-mode .highlight,
body.dark-mode .hero .highlight,
body.dark-mode .section-title i,
body.dark-mode .footer-col h4,
body.dark-mode .kicker {
  color: var(--service-accent) !important;
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode label,
body.dark-mode .muted,
body.dark-mode .lead,
body.dark-mode .section-subtitle,
body.dark-mode .hero-subtitle,
body.dark-mode .footer-tagline,
body.dark-mode .footer-col a,
body.dark-mode .nav-link,
body.dark-mode .navlinks a {
  color: var(--ecosystem-muted);
}

body.dark-mode .hero .badge,
body.dark-mode .badge {
  color: var(--service-accent);
  background: color-mix(in srgb, var(--service-primary) 18%, #0f141c);
  border-color: var(--ecosystem-border);
}

body.dark-mode .band {
  background: linear-gradient(135deg, var(--service-secondary) 0%, #0f141c 100%);
  color: #ffffff;
}

body.dark-mode .band h1,
body.dark-mode .band h2,
body.dark-mode .band h3,
body.dark-mode .band p { color: #ffffff; }

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode pre,
body.dark-mode code {
  background: #0f172a;
  color: var(--ecosystem-ink);
  border-color: var(--ecosystem-border);
}

body.dark-mode .btn,
body.dark-mode .button.primary,
body.dark-mode .cta-button.primary {
  background: var(--service-primary);
  color: #ffffff;
}

body.dark-mode .button,
body.dark-mode .cta-button,
body.dark-mode .nav-btn,
body.dark-mode .btn-secondary {
  background: #0f172a;
  color: var(--ecosystem-ink);
  border-color: var(--ecosystem-border);
}

body.dark-mode .footer,
body.dark-mode footer {
  background: var(--ecosystem-footer);
  color: #f8fafc;
}

/* SITANO official SVG mark: geometry is fixed in /static/brand assets. */
.nav-brand {
  min-width: 0;
  flex-shrink: 0;
}

.logo {
  width: 46px !important;
  min-width: 46px;
  height: 46px;
  padding: 0;
  box-sizing: border-box;
  display: inline-block;
  flex: 0 0 46px;
  overflow: hidden;
  color: transparent !important;
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;
  background-color: transparent !important;
  background-image: url('/static/brand/sitano-nav-symbol.svg?v=3.0.1');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  border-radius: 0;
}

.brand-name {
  min-width: 0;
  line-height: 1.15;
}

@media (max-width: 640px) {
  .nav-brand {
    gap: 8px;
  }

  .logo {
    width: 42px !important;
    min-width: 42px;
    height: 42px;
    flex-basis: 42px;
    padding: 0;
    font-size: 0;
  }

  .brand-name {
    font-size: 0.95rem;
  }
}

/* SITANO master horizontal logo override. Use fixed SVG assets, never redraw. */
.nav-brand .logo {
  width: 154px !important;
  min-width: 154px !important;
  height: 44px !important;
  flex: 0 0 154px !important;
  background-image: url('/static/brand/sitano-master-horizontal.svg?v=3.0.1') !important;
  background-size: contain !important;
  background-position: center left !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
}

.footer .nav-brand .logo,
footer .nav-brand .logo,
.footer-brand .logo {
  background-image: url('/static/brand/sitano-white.svg?v=3.0.1') !important;
  filter: none !important;
}

.footer .brand-name,
footer .brand-name,
.footer-brand .brand-name {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .nav-brand .logo {
    width: 128px !important;
    min-width: 128px !important;
    height: 42px !important;
    flex-basis: 128px !important;
  }
}

/* SITANO master horizontal logo alignment and monochrome mode. */
.nav-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  min-width: 0;
  flex-shrink: 0;
}

.nav-brand .logo {
  width: 132px !important;
  min-width: 132px !important;
  height: 42px !important;
  flex: 0 0 132px !important;
  align-self: center !important;
  background-image: url('/static/brand/sitano-master-horizontal.svg?v=3.0.1') !important;
  background-size: contain !important;
  background-position: center left !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
}

.nav-brand .brand-name {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  margin: 0 !important;
}

body.dark-mode .navbar .nav-brand .logo,
body.dark-mode nav .nav-brand .logo {
  background-image: url('/static/brand/sitano-silver.svg?v=3.0.1') !important;
}

.footer .nav-brand,
footer .nav-brand,
.footer-brand {
  align-items: center !important;
  gap: 2px !important;
}

.footer .nav-brand .logo,
footer .nav-brand .logo,
.footer-brand .logo {
  background-image: url('/static/brand/sitano-silver.svg?v=3.0.1') !important;
  filter: none !important;
}

.footer .brand-name,
footer .brand-name,
.footer-brand .brand-name {
  color: #f8fafc !important;
}

@media (max-width: 640px) {
  .nav-brand {
    gap: 2px !important;
  }

  .nav-brand .logo {
    width: 126px !important;
    min-width: 126px !important;
    height: 47px !important;
    flex-basis: 126px !important;
  }
}

/* SITANO logo middle alignment correction. */
.navbar .nav-brand,
nav .nav-brand,
.footer .nav-brand,
footer .nav-brand,
.footer-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  line-height: 1 !important;
}

.navbar .nav-brand .logo,
nav .nav-brand .logo,
.footer .nav-brand .logo,
footer .nav-brand .logo,
.footer-brand .logo {
  display: block !important;
  align-self: center !important;
  margin: 0 !important;
  transform: translateY(0) !important;
  background-position: center center !important;
}

.navbar .nav-brand .brand-name,
nav .nav-brand .brand-name,
.footer .nav-brand .brand-name,
footer .nav-brand .brand-name,
.footer-brand .brand-name {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

@media (max-width: 640px) {
  .navbar .nav-brand,
  nav .nav-brand,
  .footer .nav-brand,
  footer .nav-brand,
  .footer-brand {
    gap: 2px !important;
  }
}

/* SITANO logo same-axis correction. */
.navbar .nav-brand,
nav .nav-brand,
.footer .nav-brand,
footer .nav-brand,
.footer-brand {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.navbar .nav-brand .logo,
nav .nav-brand .logo,
.footer .nav-brand .logo,
footer .nav-brand .logo,
.footer-brand .logo,
.navbar .nav-brand .brand-name,
nav .nav-brand .brand-name,
.footer .nav-brand .brand-name,
footer .nav-brand .brand-name,
.footer-brand .brand-name {
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  vertical-align: middle !important;
}

/* SITANO header/footer optical alignment correction. */
.navbar .nav-container,
nav .nav-container {
  display: flex !important;
  align-items: center !important;
}

.navbar .nav-links,
nav .nav-links {
  display: flex !important;
  align-items: center !important;
}

.navbar .nav-brand,
nav .nav-brand {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  line-height: 1 !important;
  min-height: 44px !important;
}

.navbar .nav-brand .logo,
nav .nav-brand .logo {
  width: 142px !important;
  min-width: 142px !important;
  height: 47px !important;
  flex: 0 0 142px !important;
  align-self: center !important;
  margin: 2px -8px 0 0 !important;
  background-position: center center !important;
  background-size: contain !important;
}

.navbar .nav-brand .brand-name,
nav .nav-brand .brand-name {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.footer .footer-grid,
footer .footer-grid {
  align-items: flex-start !important;
}

.footer .nav-brand,
footer .nav-brand,
.footer-brand {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  line-height: 1 !important;
  margin-top: 0 !important;
}

.footer .nav-brand .logo,
footer .nav-brand .logo,
.footer-brand .logo {
  width: 142px !important;
  min-width: 142px !important;
  height: 47px !important;
  flex: 0 0 142px !important;
  align-self: center !important;
  margin: -4px -8px 0 0 !important;
  background-position: center center !important;
  background-size: contain !important;
}

.footer .nav-brand .brand-name,
footer .nav-brand .brand-name,
.footer-brand .brand-name {
  display: inline-flex !important;
  align-items: flex-start !important;
  align-self: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

@media (max-width: 640px) {
  .navbar .nav-brand .logo,
  nav .nav-brand .logo,
  .footer .nav-brand .logo,
  footer .nav-brand .logo,
  .footer-brand .logo {
    width: 126px !important;
    min-width: 126px !important;
    height: 42px !important;
    flex-basis: 126px !important;
    margin-right: -8px !important;
  }
}

/* SITANO subtle logo vertical reading adjustment. */
.navbar .nav-brand .logo,
nav .nav-brand .logo {
  transform: translateY(2px) !important;
}

.footer .nav-brand .logo,
footer .nav-brand .logo,
.footer-brand .logo {
  transform: translateY(4px) !important;
}

/* Public portal footer: keep the five link groups on one row on desktop. */
.footer .footer-grid,
footer .footer-grid {
  grid-template-columns: minmax(96px, 0.55fr) repeat(5, minmax(104px, 1fr)) !important;
  gap: 12px !important;
}

.footer .footer-col,
footer .footer-col {
  min-width: 0 !important;
}

.footer .footer-col h4,
footer .footer-col h4 {
  white-space: nowrap !important;
  font-size: 0.88rem !important;
  margin-bottom: 0.75rem !important;
}

.footer .footer-link,
footer .footer-link {
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
}

.footer .footer-col:first-child,
footer .footer-col:first-child {
  max-width: 110px !important;
}

.footer .footer-col:first-child .nav-brand,
footer .footer-col:first-child .nav-brand {
  transform: scale(0.74) !important;
  transform-origin: left top !important;
}

.footer .footer-tagline,
footer .footer-tagline {
  max-width: 105px !important;
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
}

@media (max-width: 980px) {
  .footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }

  .footer .footer-col:first-child,
  footer .footer-col:first-child {
    max-width: none !important;
  }
}

@media (max-width: 640px) {
  .footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================
   SITANO GROUP PUBLIC FOOTER - FINAL DESKTOP ALIGNMENT
   ========================================================== */

@media (min-width: 1100px) {
  .footer .footer-grid,
  footer .footer-grid {
    display: grid;
    grid-template-columns:
      minmax(250px, 1.45fr)
      minmax(120px, 0.85fr)
      minmax(120px, 0.85fr)
      minmax(120px, 0.85fr)
      minmax(120px, 0.85fr)
      minmax(120px, 0.85fr);
    column-gap: 1rem;
    align-items: start;
  }

  /* Give Technology a little breathing room after the brand. */
  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    padding-left: 1.25rem;
  }

  .footer .footer-col,
  footer .footer-col {
    min-width: 0;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1099px) {
  .footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 1rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    padding-left: 0;
  }
}

/* ==========================================================
   SITANO GROUP FOOTER — FINAL PRODUCTION LAYOUT
   Brand + five functional columns
   ========================================================== */

@media (min-width: 1100px) {

  .footer .footer-grid,
  footer .footer-grid {
    display: grid;

    /*
      First column reserved for SITANO logo + Group + tagline.
      Other columns are compact and evenly distributed.
    */
    grid-template-columns:
      minmax(270px, 1.55fr)
      minmax(125px, 0.82fr)
      repeat(4, minmax(110px, 0.82fr));

    column-gap: 0.75rem;
    row-gap: 0;
    align-items: start;
  }

  /* Brand column gets enough physical width */
  .footer .footer-col:first-child,
  footer .footer-col:first-child {
    min-width: 270px;
    padding-right: 1rem;
  }

  /* Technology starts clearly after the brand */
  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    padding-left: 1.5rem;
  }

  .footer .footer-col,
  footer .footer-col {
    min-width: 0;
  }

  .footer .footer-col h4,
  footer .footer-col h4 {
    white-space: nowrap;
  }

  .footer .footer-brand,
  footer .footer-brand,
  .footer .nav-brand,
  footer .nav-brand {
    max-width: 250px;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1099px) {
  .footer .footer-grid,
  footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 1rem;
  }

  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    padding-left: 0;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .footer .footer-grid,
  footer .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer .footer-col:first-child,
  footer .footer-col:first-child,
  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

/* ==========================================================
   SITANO GROUP FOOTER — FINAL OPTICAL ALIGNMENT
   ========================================================== */

@media (min-width: 1100px) {

  .footer .footer-grid,
  footer .footer-grid {
    display: grid !important;

    /*
      Wider brand zone, compact functional columns.
    */
    grid-template-columns:
      minmax(300px, 1.60fr)
      minmax(135px, 0.80fr)
      repeat(4, minmax(105px, 0.78fr)) !important;

    column-gap: 0.65rem !important;
    align-items: start !important;
  }

  /* Reserve real space for logo + Group + tagline */
  .footer .footer-col:first-child,
  footer .footer-col:first-child {
    min-width: 300px !important;
    padding-right: 1.5rem !important;
  }

  /* Push Technology clearly away from the brand */
  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    padding-left: 2.5rem !important;
  }

  /* Slightly lower Group so its baseline aligns better with the logo */
  .footer .footer-col:first-child .brand-name,
  footer .footer-col:first-child .brand-name,
  .footer-brand .brand-name {
    position: relative !important;
    top: 4px !important;
  }

  /* Keep brand block compact */
  .footer .footer-col:first-child .nav-brand,
  footer .footer-col:first-child .nav-brand,
  .footer-brand {
    max-width: 280px !important;
  }

  .footer .footer-col,
  footer .footer-col {
    min-width: 0 !important;
  }
}


/* Tablet */
@media (min-width: 769px) and (max-width: 1099px) {

  .footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.5rem 1rem !important;
  }

  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    padding-left: 0 !important;
  }

  .footer .footer-col:first-child .brand-name,
  footer .footer-col:first-child .brand-name,
  .footer-brand .brand-name {
    top: 2px !important;
  }
}


/* Mobile */
@media (max-width: 768px) {

  .footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .footer .footer-col:first-child,
  footer .footer-col:first-child,
  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .footer .footer-col:first-child .brand-name,
  footer .footer-col:first-child .brand-name,
  .footer-brand .brand-name {
    top: 0 !important;
  }
}

/* SITANO Group footer optical alignment */
@media (min-width: 769px) {
  .footer .footer-col:first-child .brand-name,
  footer .footer-col:first-child .brand-name,
  .footer-brand .brand-name {
    position: relative !important;
    top: 7px !important;
  }

  .footer .footer-col:first-child .footer-tagline,
  footer .footer-col:first-child .footer-tagline {
    position: relative !important;
    top: 6px !important;
  }

  .footer .footer-col:nth-child(2),
  footer .footer-col:nth-child(2) {
    padding-left: 3.25rem !important;
  }
}

/* Mobile containment for SITANO public portal, auth and governance pages. */
html,
body {
  max-width: 100%;
}

.navbar,
nav,
.footer,
footer {
  max-width: 100%;
  overflow-x: clip;
}

.nav-container,
.container,
.wrap,
.footer .container,
footer .container {
  box-sizing: border-box;
  max-width: 100%;
}

.mobile-nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .navbar .nav-container,
  nav .nav-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 10px !important;
    overflow-x: hidden !important;
  }

  .navbar .nav-brand,
  nav .nav-brand {
    grid-column: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    max-width: 100% !important;
  }

  .navbar .nav-brand .logo,
  nav .nav-brand .logo {
    width: 112px !important;
    min-width: 112px !important;
    height: 37px !important;
    flex-basis: auto !important;
  }

  .navbar .nav-brand .brand-name,
  nav .nav-brand .brand-name {
    font-size: clamp(1rem, 4.2vw, 1.18rem) !important;
  }

  .mobile-nav-toggle {
    grid-column: 2 !important;
    display: inline-flex !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 5px !important;
    border: 1px solid var(--ecosystem-border) !important;
    border-radius: 8px !important;
    background: var(--ecosystem-surface) !important;
    color: var(--ecosystem-ink) !important;
    cursor: pointer !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
  }

  .mobile-nav-toggle span {
    display: block !important;
    width: 19px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    transition: transform 160ms ease, opacity 160ms ease !important;
  }

  .nav-container.nav-open .mobile-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg) !important;
  }

  .nav-container.nav-open .mobile-nav-toggle span:nth-child(2) {
    opacity: 0 !important;
  }

  .nav-container.nav-open .mobile-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg) !important;
  }

  body.dark-mode .mobile-nav-toggle {
    background: #0f172a !important;
    color: var(--ecosystem-ink) !important;
    border-color: var(--ecosystem-border) !important;
  }

  .navbar .nav-links,
  nav .nav-links {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: none !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 0 2px !important;
    border-top: 1px solid var(--ecosystem-border) !important;
    overflow-x: hidden !important;
  }

  .navbar .nav-container.nav-open .nav-links,
  nav .nav-container.nav-open .nav-links,
  .navbar .nav-links.is-open,
  nav .nav-links.is-open {
    display: flex !important;
  }

  .navbar .nav-link,
  nav .nav-link,
  .navbar .nav-btn,
  nav .nav-btn,
  #logoutBtn.nav-link {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 8px 10px !important;
    font-size: 0.82rem !important;
    line-height: 1.15 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    border: 1px solid var(--ecosystem-border) !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--ecosystem-surface) 92%, var(--service-primary)) !important;
  }

  #organization-selector-container,
  #organization-selector-container * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .container,
  .wrap,
  .footer .container,
  footer .container {
    width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .hero,
  header.hero,
  .section,
  .cta-section {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .hero-content,
  .hero-title,
  .hero-subtitle,
  .section-title,
  .section-subtitle {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  .hero-title,
  .section-title {
    line-height: 1.14 !important;
  }

  .hero-stats {
    width: 100% !important;
    justify-content: center !important;
    gap: 10px !important;
  }

  .stat {
    flex: 1 1 135px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: center !important;
  }

  .certificate-grid,
  .usecase-grid,
  .features-grid,
  .pricing-grid,
  .dashboard-grid,
  main .section [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 16px !important;
  }

  .cert-card,
  .usecase-card,
  .feature-card,
  .pricing-card,
  .dashboard-card,
  .card,
  .panel,
  .auth-card,
  .auth-container,
  .form-block,
  .feedback-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 18px !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
  }

  .auth-card {
    margin: 28px auto !important;
  }

  .cert-card li,
  .usecase-card li,
  .feature-card li,
  .pricing-card li {
    display: block !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    line-height: 1.4 !important;
  }

  .cta-container,
  .actions,
  .auth-card form,
  .form-block,
  .feedback-form,
  .inline-fields,
  .inline-fields .form-row {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 12px !important;
  }

  .cta-button,
  .btn,
  .button,
  .btn-secondary,
  input,
  select,
  textarea,
  button {
    max-width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    box-sizing: border-box !important;
  }

  .cta-button,
  .btn,
  .button,
  .btn-secondary,
  .auth-card button,
  .form-block button,
  .feedback-form button,
  .auth-card input,
  .auth-card select,
  .auth-card textarea,
  .form-block input,
  .form-block select,
  .form-block textarea {
    width: 100% !important;
    justify-content: center !important;
  }

  table,
  pre {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
  }

  code {
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
  }

  .footer,
  footer {
    padding: 42px 0 24px !important;
  }

  .footer .footer-grid,
  footer .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    margin-bottom: 24px !important;
  }

  .footer p,
  footer p,
  .footer-link,
  .footer-col,
  .footer-col h4 {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    text-align: center;
  }

  .footer-bottom,
  footer .footer-bottom {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 12px !important;
  }

  .visual-hero-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 24px !important;
  }

  .visual-hero-panel img {
    aspect-ratio: 16 / 10 !important;
    object-fit: contain !important;
    background: #f8fafc !important;
  }

  .visual-hero-caption {
    display: grid !important;
    gap: 6px !important;
  }

  .visual-hero-arrow {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .navbar .nav-container,
  nav .nav-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .navbar .nav-brand .logo,
  nav .nav-brand .logo {
    width: 98px !important;
    min-width: 98px !important;
    height: 33px !important;
  }

  .navbar .nav-link,
  nav .nav-link,
  .navbar .nav-btn,
  nav .nav-btn,
  #logoutBtn.nav-link {
    padding: 7px 8px !important;
    font-size: 0.78rem !important;
  }
}

@media (min-width: 761px) {
  .navbar .nav-links,
  nav .nav-links {
    display: flex !important;
  }
}

/* V3 logo optical alignment using the source SVG's real 1380:580 ratio. */
.navbar .nav-brand .logo,
nav .nav-brand .logo,
.footer .nav-brand .logo,
footer .nav-brand .logo,
.footer-brand .logo {
  --sitano-logo-width: clamp(112px, 18vw, 171.3285px);
  width: var(--sitano-logo-width) !important;
  min-width: var(--sitano-logo-width) !important;
  height: auto !important;
  aspect-ratio: 69 / 29 !important;
  flex: 0 0 var(--sitano-logo-width) !important;
  background-size: contain !important;
  background-position: center !important;
  transform: translateY(-10px) !important;
}
