/* ==========================================================================
   NSD Software Editor (mynsd.info/ver2) — Homepage-Matched Inner Page System
   Matches portal.php's precision aesthetic: light radial hero, framed media,
   hairline-divided architectural bento grids, dark-orange accent bands.
   ========================================================================== */

/* Match "NSD" brand title to the navy wordmark inside logo_new_nsd.png */
.nsd-brand-title {
  font-family: "Arial", "Helvetica Neue", sans-serif !important;
  font-weight: 700 !important;
  font-size: 19px !important;
  letter-spacing: -0.01em !important;
  color: #0b1e8a !important;
  line-height: 1 !important;
}

html[data-theme="dark"] .nsd-brand-title {
  color: #ffffff !important;
}

/* ==========================================================================
   ENTERPRISE UTILITY TOPBAR (.nsd-topbar) — MATCHES ORIGINAL MYNSD LINKS
   ========================================================================== */
:root {
  --topbar-h: 34px;
}

.nsd-topbar {
  height: var(--topbar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font: 500 11.5px/1 var(--font-body);
}

.nsd-topbar-in {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nsd-topbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nsd-topbar-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--fg-2);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nsd-topbar-links a svg {
  width: 12px;
  height: 12px;
  color: var(--brand);
  opacity: 0.85;
  flex-shrink: 0;
}

.nsd-topbar-links a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nsd-topbar-socials {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nsd-topbar-socials a {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nsd-topbar-socials a svg {
  width: 13px;
  height: 13px;
}

.nsd-topbar-socials a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

/* Offset homepage & inner heroes cleanly for the 34px utility topbar */
.hero {
  padding-top: calc(var(--nav-h) + var(--topbar-h) + 28px) !important;
}

@media (max-width: 960px) {
  :root {
    --topbar-h: 0px;
  }

  .nsd-topbar {
    display: none;
  }
}

/* Subtle separation border + shadow under the top navbar across portal & all inner pages */
header.nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px -10px rgba(0, 0, 0, 0.14);
}

html[data-theme="dark"] header.nav {
  background: rgba(18, 18, 22, 0.94);
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 4px 18px -8px rgba(0, 0, 0, 0.45);
}

/* Global Inner-Page Spacing (compact across all ver2 inner pages) */
.inner-hero {
  padding: calc(var(--nav-h) + var(--topbar-h) + 12px) 0 16px !important;
  background: radial-gradient(960px 460px at 80% 0%, var(--brand-soft) 0%, transparent 72%), var(--bg) !important;
  border-bottom: 1px solid var(--line);
}

.inner-hero-in {
  gap: 8px !important;
}

.inner-title {
  font-size: clamp(22px, 2.2vw, 28px) !important;
  line-height: 1.18 !important;
}

.inner-lead {
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.inner-stats-strip {
  padding-top: 8px !important;
  margin-top: 2px !important;
  gap: 10px 22px !important;
}

.page-section {
  padding: 16px 0 !important;
}

.page-section.alt {
  padding: 18px 0 !important;
}

.section-head {
  margin-bottom: 12px !important;
  gap: 6px !important;
}

.section-head .tag {
  align-self: flex-start !important;
  width: auto !important;
}

.section-head h2 {
  font-size: clamp(19px, 2vw, 24px) !important;
  line-height: 1.2 !important;
}

.section-head p {
  font-size: 14px !important;
  line-height: 1.55 !important;
}

/* Compact product, AYA & portal cards across inner pages */
.pro-grid,
.portal-grid,
.aya-tri-grid {
  gap: 16px !important;
}

.pro-card,
.portal-card {
  padding: 18px 20px !important;
}

.pro-card-top {
  margin-bottom: 12px !important;
}

.pro-icon-box {
  width: 40px !important;
  height: 40px !important;
}

.pro-title,
.portal-name {
  font-size: 17px !important;
  margin-bottom: 4px !important;
}

.pro-subtitle {
  font-size: 12px !important;
  margin-bottom: 8px !important;
}

.pro-desc,
.portal-desc {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  margin-bottom: 12px !important;
}

.aya-card {
  padding: 20px 22px !important;
}

.aya-card-title {
  font-size: 19px !important;
  margin-bottom: 4px !important;
}

.aya-card-sub {
  font-size: 12px !important;
  margin-bottom: 10px !important;
}

.aya-card-desc {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  margin-bottom: 14px !important;
}

.aya-erp-sync-box {
  padding: 12px 14px !important;
}

.aya-hero-badge {
  padding: 4px 11px !important;
  font-size: 10.5px !important;
}

.section-head.tag {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: auto !important;
  margin: 0 auto 8px !important;
  padding: 5px 12px !important;
}

.footer {
  padding-top: 32px !important;
}

/* ==========================================================================
   P3 INNER HERO — PRECISION ENTERPRISE HEADER (MATCHES PORTAL.PHP)
   ========================================================================== */
.p3-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + var(--topbar-h) + 12px) 0 14px !important;
  background:
    radial-gradient(680px 320px at 88% -10%, rgba(250, 85, 6, 0.11) 0%, transparent 70%),
    radial-gradient(520px 260px at 8% 100%, rgba(255, 183, 3, 0.08) 0%, transparent 70%),
    var(--bg) !important;
}

/* Subtle architectural radar-ring watermark echoing portal.php */
.p3-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px dashed var(--brand-line);
  box-shadow: 0 0 0 46px rgba(250, 85, 6, 0.025), inset 0 0 0 56px rgba(250, 85, 6, 0.02);
  pointer-events: none;
  opacity: 0.7;
}

.p3-hero-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.p3-hero-util {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}

.p3-hero-util .inner-breadcrumb .curr {
  color: var(--brand);
  font-weight: 700;
}

.p3-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--fg-2);
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.08);
}

.p3-status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.p3-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  flex-wrap: wrap;
}

.p3-hero-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 420px;
}

.p3-hero-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-soft), rgba(255, 183, 3, 0.12));
  border: 1px solid var(--brand-line);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 10px 22px -12px var(--glow);
}

.p3-hero-icon svg {
  width: 22px;
  height: 22px;
}

.p3-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.p3-hero-title {
  font: 700 clamp(22px, 2.2vw, 30px)/1.14 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0;
}

.p3-hero-lead {
  font: 400 15px/1.55 var(--font-body);
  color: var(--muted);
  margin: 0;
  max-width: 66ch;
}

.p3-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* Distinct NSD Logo Navy CTA in inner hero so it complements the orange navbar CTA */
.p3-hero-actions .btn-primary {
  background: linear-gradient(135deg, #0b1e8a 0%, #1b36b8 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(11, 30, 138, 0.35) !important;
  box-shadow: 0 10px 22px -10px rgba(11, 30, 138, 0.42) !important;
}

.p3-hero-actions .btn-primary:hover {
  background: linear-gradient(135deg, #08166b 0%, #142b9c 100%) !important;
  border-color: rgba(11, 30, 138, 0.55) !important;
  box-shadow: 0 14px 26px -10px rgba(11, 30, 138, 0.52) !important;
}

html[data-theme="dark"] .p3-hero-actions .btn-primary {
  background: linear-gradient(135deg, #1b36b8 0%, #0b1e8a 100%) !important;
  border-color: rgba(123, 154, 255, 0.35) !important;
}

.p3-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-2);
}

.p3-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--fg-2);
  text-transform: uppercase;
}

.p3-meta-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--brand);
  flex-shrink: 0;
}

/* ==========================================================================
   BOTTOM CTA BANNER — MATCHES PORTAL.PHP CARD LANGUAGE
   ========================================================================== */
.p3-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}

.p3-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
}

.p3-cta-copy h2 {
  font: 700 clamp(20px, 2.1vw, 25px)/1.18 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--fg);
  margin: 0;
}

.p3-cta-copy p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.p3-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.p3-cta-actions .btn {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* ==========================================================================
   DB CONTENT TYPOGRAPHY & SECTION RHYTHM
   ========================================================================== */
.db-content {
  width: 100%;
  color: var(--fg-2);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
}

.db-content>*:first-child {
  margin-top: 0 !important;
}

.db-content>*:last-child {
  margin-bottom: 0 !important;
}

.db-content h1,
.db-content h2,
.db-content h3,
.db-content h4,
.db-content h5,
.db-content h6 {
  font-family: var(--font-display);
  color: var(--fg);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0.95em 0 0.4em;
}

.db-content h1,
.db-content h2 {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
}

.db-content>h2:not(:first-child) {
  padding-top: 14px;
  border-top: 1px dashed var(--line-2);
}

.db-content h2 span,
.db-content h3 span {
  color: var(--brand);
}

.db-content h3 {
  font-size: clamp(16.5px, 1.5vw, 19px);
  font-weight: 700;
}

.db-content h3.p3-subhead {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--fg);
  margin: 18px 0 6px;
  padding: 6px 0 6px 12px;
  border-left: 3px solid var(--brand);
  line-height: 1.25;
}

.db-content h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--fg);
}

.db-content p {
  margin: 0 0 0.72em;
  color: var(--fg-2);
}

.db-content .p3-lead {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.6;
  margin: 0 0 10px;
}

.db-content strong,
.db-content b {
  color: var(--fg);
  font-weight: 600;
}

.db-content a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--brand-line);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.db-content a:hover {
  color: var(--brand-ink);
  border-bottom-color: var(--brand);
}

/* ==========================================================================
   ARCHITECTURAL BENTO GRID (.p3-grid) — MATCHES PORTAL.PHP INDUSTRIES GRID
   ========================================================================== */
.db-content .p3-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin: 14px 0;
}

.db-content .p3-col {
  background: var(--card);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  transition: background 0.25s var(--ease);
  position: relative;
}

.db-content .p3-col:hover {
  background: var(--bg-2);
}

.db-content .p3-col>*:first-child {
  margin-top: 0 !important;
}

.db-content .p3-col>*:last-child {
  margin-bottom: 0 !important;
}

.db-content .p3-col h4 {
  font-size: 17px;
  color: var(--fg);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-content .p3-col h4::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.db-content .p3-col p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.db-content .p3-span-12 {
  grid-column: span 12;
}

.db-content .p3-span-9 {
  grid-column: span 9;
}

.db-content .p3-span-8 {
  grid-column: span 8;
}

.db-content .p3-span-7 {
  grid-column: span 7;
}

.db-content .p3-span-6 {
  grid-column: span 6;
}

.db-content .p3-span-5 {
  grid-column: span 5;
}

.db-content .p3-span-4 {
  grid-column: span 4;
}

.db-content .p3-span-3 {
  grid-column: span 3;
}

/* Stretch single-column .p3-grid blocks to full width so no empty gray gap appears */
.db-content .p3-grid > .p3-col:only-child {
  grid-column: 1 / -1 !important;
}

.db-content .p3-grid > .p3-col:empty {
  display: none !important;
}

/* ==========================================================================
   SIDE-BY-SIDE EDITORIAL SPLIT (.p3-split)
   ========================================================================== */
.db-content .p3-split {
  display: grid;
  gap: 20px;
  align-items: start;
  margin: 12px 0;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  position: relative;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.db-content .p3-split:hover {
  border-color: var(--brand-line);
  box-shadow: 0 16px 36px -22px var(--glow);
}

.db-content .p3-split-right {
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.75fr);
}

.db-content .p3-split-left {
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.55fr);
}

.db-content .p3-split-body>*:first-child {
  margin-top: 0 !important;
}

.db-content .p3-split-body>*:last-child {
  margin-bottom: 0 !important;
}

.db-content .p3-split-media img,
.db-content .p3-split-media img.p3-photo {
  width: 100%;
  height: 225px;
  max-height: 240px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 0;
}

/* ==========================================================================
   FEATURED DARK-ORANGE ACCENT BAND (.p3-band) — MATCHES PORTAL.PHP FEATURED TILE
   ========================================================================== */
.db-content .p3-band {
  background: linear-gradient(135deg, #1b1716 0%, #3a1707 58%, #6d2606 100%) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(250, 85, 6, 0.38);
  border-radius: var(--r-sm);
  padding: 20px 24px !important;
  margin: 16px 0 !important;
  box-shadow: 0 20px 44px -22px rgba(250, 85, 6, 0.28);
}

.db-content .p3-band h2,
.db-content .p3-band h3,
.db-content .p3-band h4,
.db-content .p3-band strong {
  color: #ffffff !important;
  border-top: none !important;
  padding-top: 0 !important;
}

.db-content .p3-band p {
  color: rgba(255, 255, 255, 0.85) !important;
}

.db-content .p3-band .p3-split {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 16px 0 0;
}

.db-content .p3-band .p3-list>li {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ==========================================================================
   MODULE & FEATURE CARDS (.p3-cards / .p3-card)
   ========================================================================== */
.db-content .p3-cards {
  display: grid;
  gap: 16px;
  margin: 14px 0;
}

.db-content .p3-cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.db-content .p3-cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.db-content .p3-cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1080px) {
  .db-content .p3-cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.db-content .p3-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.db-content .p3-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-cyan));
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  z-index: 2;
}

.db-content .p3-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-line);
  box-shadow: 0 18px 36px -14px var(--glow);
}

.db-content .p3-card:hover::before {
  opacity: 1;
}

.db-content .p3-card-img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  margin: 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.db-content .p3-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.db-content .p3-card-body h3 {
  font-size: 16.5px;
  margin: 0 0 8px;
  color: var(--fg);
}

.db-content .p3-card-body p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 12px;
  flex: 1;
}

.db-content .p3-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 600 12.5px/1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  border-bottom: none;
  align-self: flex-start;
  margin-top: auto;
}

/* ==========================================================================
   TWO-COLUMN & ARCHITECTURAL CHECKLISTS (.p3-list)
   ========================================================================== */
.db-content .p3-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0;
}

.db-content .p3-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.db-content .p3-list-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
}

.db-content .p3-list>li {
  position: relative;
  padding: 5px 11px 5px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--fg-2);
  transition: border-color 0.2s var(--ease);
}

.db-content .p3-list>li:hover {
  border-color: var(--brand-line);
}

.db-content .p3-list>li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--brand);
  box-shadow: 0 0 0 2.5px var(--brand-soft);
}

/* Sleek Horizontal Feature Highlight Card (icon + heading + description) */
.db-content .p3-highlight-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 22px;
  margin: 16px 0;
  background: linear-gradient(135deg, var(--card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand);
  border-radius: 14px;
  box-shadow: 0 12px 28px -18px var(--glow);
}

.db-content .p3-hl-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 10px;
}

.db-content .p3-hl-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  display: block;
}

.db-content .p3-hl-photo {
  width: 195px;
  height: 128px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--bg-2);
}

.db-content .p3-hl-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  display: block;
}

.db-content .p3-hl-body {
  flex: 1;
  min-width: 0;
}

.db-content .p3-hl-body h2,
.db-content .p3-hl-body h3,
.db-content .p3-hl-body h4 {
  margin: 0 0 6px !important;
  padding-top: 0 !important;
  border-top: none !important;
  color: var(--fg);
  font-size: 18px;
}

.db-content .p3-hl-body p {
  margin: 0 !important;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-2);
}

@media (max-width: 600px) {
  .db-content .p3-highlight-card {
    flex-direction: column;
    gap: 12px;
  }
}

/* Figures, Icons, Quotes, Tables */
.db-content .p3-figure {
  margin: 12px 0;
}

.db-content .p3-figure img:not(.p3-icon) {
  max-height: 300px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.db-content img:not(.p3-icon),
.db-content img.p3-photo {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  display: block;
}

.db-content .p3-card-img img {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--line);
}

.db-content img.p3-icon {
  width: auto;
  max-height: 46px;
  padding: 7px;
  border-radius: 10px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  margin: 14px 0 8px;
  display: inline-block;
}

.db-content .p3-quote {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--r-xs);
}

.db-content .p3-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
}

.db-content .p3-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.db-content .p3-table th,
.db-content .p3-table td {
  padding: 5px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
}

.db-content .p3-table td p,
.db-content .p3-table th p {
  margin: 0 !important;
  line-height: 1.35;
}

.db-content .p3-table tbody tr:nth-child(even) td {
  background: var(--bg-2);
}

.db-content .p3-table th {
  padding: 7px 12px;
  background: var(--bg-2);
  color: var(--fg);
  font-weight: 700;
  font-size: 12.5px;
  font-family: var(--font-display);
}

.db-content .p3-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   COMPACT CONTACT US MODAL (NO SCROLLBAR, SINGLE-ROW SECURITY CODE)
   ========================================================================== */
.nsd-modal-backdrop[hidden] {
  display: none !important;
}

.nsd-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 16, 22, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.nsd-modal-box {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px 20px 18px;
  box-shadow: 0 28px 64px -18px rgba(0, 0, 0, 0.38);
  position: relative;
}

.nsd-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.nsd-modal-eyebrow {
  display: block;
  font: 600 9.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--brand);
  margin-bottom: 3px;
}

.nsd-modal-head h3 {
  font: 700 18px/1.15 var(--font-display);
  color: var(--fg);
  margin: 0;
}

.nsd-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--fg-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s var(--ease);
}

.nsd-modal-close:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.nsd-modal-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nsd-m-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.nsd-m-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nsd-m-field label,
.c-form .f-group label {
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.nsd-m-field input,
.nsd-m-field select,
.c-form input,
.c-form select,
.p3-std-form input,
.p3-std-form select {
  width: 100%;
  height: 32px !important;
  padding: 4px 10px !important;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body) !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.nsd-m-field input[type="file"],
.p3-std-form input[type="file"] {
  height: auto !important;
  padding: 5px 8px !important;
  font-size: 11.5px !important;
}

.nsd-m-field textarea,
.c-form textarea,
.p3-std-form textarea {
  width: 100%;
  padding: 6px 10px !important;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body) !important;
  font-size: 11.5px !important;
  line-height: 1.45 !important;
  outline: none;
  resize: vertical;
  min-height: 56px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

form input::placeholder,
form textarea::placeholder {
  font-size: 11.5px !important;
}

.nsd-m-field input:focus,
.nsd-m-field select:focus,
.nsd-m-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.nsd-sec-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nsd-sec-code {
  height: 32px;
  min-width: 112px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px dashed var(--brand-line);
  background: linear-gradient(135deg, var(--bg-2), var(--brand-soft));
  color: var(--fg);
  font: 700 13.5px/30px var(--font-mono);
  letter-spacing: 0.14em;
  text-align: center;
  user-select: none;
  flex-shrink: 0;
}

.nsd-sec-refresh {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--fg-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}

.nsd-sec-refresh svg {
  width: 14px;
  height: 14px;
}

.nsd-sec-refresh:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.nsd-sec-row input {
  height: 32px !important;
  font-size: 11.5px !important;
  text-transform: uppercase;
  font-family: var(--font-mono) !important;
  letter-spacing: 0.1em;
}

.nsd-m-status {
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 1.4;
}

.nsd-m-status.ok {
  background: rgba(23, 152, 80, 0.12);
  border: 1px solid rgba(23, 152, 80, 0.35);
  color: #15803d;
}

.nsd-m-status.err {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

.nsd-m-submit {
  width: 100%;
  height: 36px;
  font-size: 13px;
  justify-content: center;
  margin-top: 2px;
}

@media (max-width: 560px) {
  .nsd-m-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MIGRATED APP PAGES (support, search, page_cert, tv_spot, nsd_utl)
   ========================================================================== */
.p3-app-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.p3-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.p3-side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.p3-side-accent {
  background: linear-gradient(135deg, #1b1716 0%, #3a1707 60%, #6d2606 100%);
  border-color: rgba(250, 85, 6, 0.35);
  color: rgba(255, 255, 255, 0.9);
}

.p3-side-accent .p3-side-title {
  color: #ffb703;
}

.p3-side-accent p {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 14px;
}

.p3-side-title {
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

.p3-side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p3-side-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
  font: 600 13px/1.2 var(--font-body);
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.p3-side-nav a:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

.p3-form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
}

.p3-form-sec-title {
  font: 700 11.5px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 16px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-2);
}

.p3-form-sec-title:first-child {
  margin-top: 0;
}

.p3-std-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p3-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.p3-radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-top: 4px;
}

.p3-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13.5px/1.2 var(--font-body);
  color: var(--fg-2);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.p3-radio-row input[type="radio"] {
  width: auto;
  accent-color: var(--brand);
}

.p3-form-recaptcha {
  margin-top: 6px;
}

.p3-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.p3-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.p3-search-bar input {
  flex: 1;
  height: 32px !important;
  padding: 0 11px !important;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body) !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  outline: none;
}

.p3-search-bar input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.p3-search-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.p3-search-item {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.p3-search-item:hover {
  border-color: var(--brand-line);
  transform: translateY(-1px);
}

.p3-search-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.p3-search-item-head strong {
  color: var(--fg);
  font-size: 15px;
}

.p3-search-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.p3-dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.p3-dict-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
  font: 600 13.5px/1.2 var(--font-body);
  text-decoration: none;
  transition: all 0.2s var(--ease);
}

.p3-dict-card:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

.p3-dict-ico {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.p3-dict-ico svg {
  width: 15px;
  height: 15px;
}

.p3-cert-result {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid rgba(23, 152, 80, 0.35);
}

.p3-cert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.p3-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0;
}

.p3-cert-grid dt {
  font: 600 10.5px/1 var(--font-mono);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.p3-cert-grid dd {
  margin: 0;
  font: 600 14.5px/1.3 var(--font-display);
  color: var(--fg);
}

.p3-video-card {
  background: #0d0d10;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.35);
}

.p3-video-card video {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 860px) {

  .p3-app-layout,
  .p3-form-grid-2 {
    grid-template-columns: 1fr;
  }

  .p3-search-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 860px) {

  .p3-hero-grid.has-media,
  .db-content .p3-split,
  .db-content .p3-two-col,
  .db-content .p3-list-2col,
  .db-content .p3-cards,
  .db-content .p3-grid {
    grid-template-columns: 1fr !important;
  }

  .db-content .p3-col {
    grid-column: 1 / -1 !important;
  }

  .p3-cta-banner {
    padding: 22px;
  }
}