/* Perivue dark theme. Loaded last on every page; restyles the legacy layout to match the AI page. */
:root {
  --pv-bg: #08173A;
  --pv-surface: rgba(8, 20, 50, 0.78);
  --pv-surface-2: #13265A;
  --pv-line: rgba(148, 163, 184, 0.18);
  --pv-line-strong: rgba(148, 163, 184, 0.32);
  --pv-ink: #F8FAFC;
  --pv-text: #CBD5E1;
  --pv-muted: #94A3B8;
  --pv-orange: #FF6A2B;
  --pv-orange-soft: #FDBA74;
  --pv-pink: #EC4899;
  --pv-violet: #8B5CF6;
  --pv-cyan: #06B6D4;
  --pv-grad: linear-gradient(90deg, #FF4F06, #EC4899 55%, #8B5CF6);
  --pv-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pv-header-h: 77px;
  color-scheme: dark;
}

/* always reserve the scrollbar so the header never shifts sideways between short and long pages */
html { overflow-y: scroll; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 20px; }
html, body {
  background: var(--pv-bg) !important;
  color: var(--pv-text);
  font-family: var(--pv-font);
  font-size: 13px;
  line-height: 1.55;
  text-align: left !important;
}
body {
  overflow-x: hidden;
  padding-top: calc(var(--pv-header-h) + 20px) !important;
  /* blue gradient page background */
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(59, 130, 246, 0.38), transparent 60%),
    radial-gradient(900px 500px at 0% 35%, rgba(6, 182, 212, 0.16), transparent 60%),
    linear-gradient(160deg, #13398A 0%, #0E2C6E 35%, #0A2154 70%, #071841 100%) !important;
  background-attachment: fixed !important;
}
div#mainwrapper { position: static; min-height: 0; }

/* ---------- text: every legacy font tag / class follows the theme ---------- */
body, td, th, p, li, span, div, input, select, textarea, button, font, label,
.contentfont12, .contentfont, .midpart a, .rightheader, .bluetext, .orangefont,
a.orangefontlink, a.orangefontlink1, a.orangeboldfont, a.orangeboldfont1, .blackfont {
  font-family: var(--pv-font) !important;
}
td, th, p, li, span, label, font, .contentfont12, .contentfont, .rightlink a, .content a { color: var(--pv-text); }
font[color], [style*="color: #000"], [style*="color:#000"], [style*="color: black"], [style*="color:#333"], [style*="color: #333"],
[style*="color:#4d4d4d"], [style*="color: #4d4d4d"], [style*="color:#4D4D4D"], [style*="color: #4D4D4D"] { color: var(--pv-text) !important; }
font[color="#0D4A6E"], font[color="#0d4a6e"], font[color="#00445D"], font[color="#3E7290"], font[color="#008080"], font[color="#003366"] { color: var(--pv-ink) !important; }
font[color="#DA4B04"], font[color="#da4b04"], font[color="#F75006"], font[color="#f75006"], font[color="#FF4F06"], font[color="#E50318"], font[color="#FF6600"], font[color="#ff6600"] { color: var(--pv-orange) !important; }
b, strong { color: inherit; }
.contentfont12, .contentfont { line-height: 1.65; text-align: left; }
td[align="justify"], p[align="justify"], .justify { text-align: left !important; }

a { color: var(--pv-orange); }
a:hover { color: var(--pv-pink); }
.contentfont12 a, .rightlink a, .content a, .rightpart-news a { color: var(--pv-orange) !important; }
.contentfont12 a:hover, .rightlink a:hover, .content a:hover, .rightpart-news a:hover { color: var(--pv-pink) !important; }

h1, h2, h3, h4, h5 { color: var(--pv-ink); font-family: var(--pv-font) !important; }
h1 { font-weight: 800; background: none; border-bottom: 3px solid transparent; border-image: var(--pv-grad) 1; }
.bluetext, .midpartheader, .rightheader, .blackfont, .bluetextlink, a.bluetextlink { color: var(--pv-ink) !important; font-weight: 800; }
a.bluetextlink:hover { color: var(--pv-orange) !important; }
.orangefont, a.orangefontlink, a.orangefontlink1, a.orangeboldfont, a.orangeboldfont1, .title, .titlenoramal, .temphead, .redbig a { color: var(--pv-orange) !important; }
a.orangefontlink:hover, a.orangefontlink1:hover { color: var(--pv-pink) !important; }

/* legacy light backgrounds become dark surfaces */
/* scoped to #mainwrapper: the dropdown menus live outside it and set their own colours inline */
#mainwrapper table[bgcolor], #mainwrapper td[bgcolor], #mainwrapper tr[bgcolor], #mainwrapper div[bgcolor],
#mainwrapper td[style*="background-color"], #mainwrapper table[style*="background-color"], #mainwrapper div[style*="background-color"], #mainwrapper p[style*="background-color"],
#mainwrapper td[style*="background:#"], #mainwrapper td[style*="background: #"], #mainwrapper span[style*="background"] { background-color: transparent !important; }
.lightbg, .darkbg, .allborder, .allborder1, .rightbg, .lightgrey, .networksbg, .fieldheader { background: var(--pv-surface) !important; color: var(--pv-text) !important; border-color: var(--pv-line) !important; }
hr { border: 0; height: 1px; background: var(--pv-line-strong); }

/* ---------- header: pinned to the same place on every page ---------- */
.pv-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: auto;
  margin: 0 !important;
  height: var(--pv-header-h);
  background: rgba(6, 16, 41, 0.92);
  border-bottom: 1px solid var(--pv-line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.pv-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--pv-grad); }
.pv-header-in {
  width: 980px;
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* the logo box includes the green bars above the letters: lift it so the letters line up with the menu */
.pv-logo { display: block; flex: 0 0 auto; line-height: 0; position: relative; top: -5px; }
.pv-logo img { width: 272px; height: auto; display: block; }

.pv-header .menu {
  background: none; height: auto; line-height: normal; overflow: visible; position: static;
  display: flex; align-items: center; gap: 2px;
  font-size: 14px; font-weight: 600; color: var(--pv-ink);
}
.pv-header .menu a {
  display: inline-block;
  height: 34px; line-height: 34px;
  padding: 0 10px !important;
  border-radius: 999px;
  color: #E2E8F0 !important;
  font-weight: 600; font-size: 14px;
  white-space: nowrap; cursor: pointer;
  background: none;
  transition: background .15s ease, color .15s ease;
}
.pv-header .menu a:hover, .pv-header .menu a.menuactive { background: rgba(255, 255, 255, 0.08) !important; color: var(--pv-orange-soft) !important; line-height: 34px; }

/* ---------- hamburger button and side menu (built by Scripts/nav.js) ---------- */
.pv-burger {
  margin-left: 4px; width: 40px; height: 40px; padding: 0 !important;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(255, 255, 255, 0.06) !important; border: 1px solid var(--pv-line-strong) !important;
  border-radius: 10px !important; box-shadow: none !important; cursor: pointer;
}
.pv-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #E2E8F0; }
.pv-burger:hover { background: rgba(255, 255, 255, 0.12) !important; border-color: rgba(255, 106, 43, 0.7) !important; }
.pv-burger:focus-visible, .pv-drawer-close:focus-visible { outline: 2px solid var(--pv-orange-soft); outline-offset: 2px; }

.pv-drawer-backdrop { position: fixed; inset: 0; background: rgba(2, 6, 23, 0.6); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; z-index: 1000; }
.pv-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 88vw; z-index: 1001;
  background: #071637; border-left: 1px solid var(--pv-line-strong); box-shadow: -20px 0 50px rgba(0, 0, 0, 0.45);
  transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility .25s;
  display: flex; flex-direction: column; text-align: left;
}
.pv-drawer::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #FF4F06, #EC4899 55%, #8B5CF6); }
html.pv-drawer-open .pv-drawer { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
html.pv-drawer-open .pv-drawer-backdrop { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
html.pv-drawer-open body { overflow: hidden; }
.pv-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px 22px; border-bottom: 1px solid var(--pv-line); }
.pv-drawer-logo img { display: block; width: 200px; height: auto; }
.pv-drawer-close { position: relative; width: 36px; height: 36px; padding: 0 !important; border-radius: 10px !important; background: rgba(255, 255, 255, 0.06) !important; border: 1px solid var(--pv-line-strong) !important; box-shadow: none !important; cursor: pointer; }
.pv-drawer-close span { position: absolute; left: 9px; top: 17px; width: 18px; height: 2px; background: #E2E8F0; border-radius: 2px; transform: rotate(45deg); }
.pv-drawer-close span + span { transform: rotate(-45deg); }
.pv-drawer-nav { flex: 1; overflow-y: auto; padding: 10px 14px 10px 18px; }
.pv-drawer-home { display: block; padding: 14px 8px; font-size: 15px; font-weight: 800; color: var(--pv-ink) !important; border-bottom: 1px solid var(--pv-line); }
.pv-drawer-home:hover, .pv-drawer-home.here { color: var(--pv-orange-soft) !important; }
.pv-drawer details { border-bottom: 1px solid var(--pv-line); }
.pv-drawer summary {
  list-style: none; cursor: pointer; padding: 14px 8px; font-size: 15px; font-weight: 800; color: var(--pv-ink);
  display: flex; align-items: center; justify-content: space-between;
}
.pv-drawer summary::-webkit-details-marker { display: none; }
.pv-drawer summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--pv-orange-soft); border-bottom: 2px solid var(--pv-orange-soft); transform: rotate(45deg); transition: transform .2s ease; margin-right: 4px; }
.pv-drawer details[open] summary::after { transform: rotate(-135deg); }
.pv-drawer ul { list-style: none; margin: 0 0 10px; padding: 0; }
.pv-drawer li { margin: 0; padding: 0; }
.pv-drawer li::marker { content: none; }
.pv-drawer a { text-decoration: none !important; }
.pv-drawer li a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #CBD5E1 !important; }
.pv-drawer li a:hover { background: rgba(255, 255, 255, 0.07); color: #fff !important; }
.pv-drawer li a.here { background: rgba(255, 106, 43, 0.14); color: var(--pv-orange-soft) !important; }
.pv-drawer-foot { padding: 16px 22px 22px; border-top: 1px solid var(--pv-line); display: grid; gap: 8px; }
.pv-drawer-call { display: block; text-align: center; padding: 11px; border-radius: 999px; font-weight: 700; color: #fff !important; background: linear-gradient(90deg, #FF4F06, #EC4899); }
.pv-drawer-mail { text-align: center; font-size: 13px; color: #CBD5E1 !important; }
@media (prefers-reduced-motion: reduce) { .pv-drawer, .pv-drawer-backdrop { transition: none; } }

/* ---------- content area ---------- */
.contentpart { text-align: left; padding-top: 0 !important; }
/* legacy fixed-height content columns leave big gaps once content changed */
.contentpart div.left[style*="height"] { height: auto !important; }
img[width="980"], img[width="980px"] { border-radius: 16px; }
.bnr01 { border-radius: 16px; overflow: hidden; }
.thumimg, .imgborder, .normalimg, .albumthumb, .bigimg { border: 1px solid var(--pv-line) !important; background: transparent !important; border-radius: 10px; }

.hline { background: linear-gradient(90deg, #FF4F06, #EC4899 55%, #8B5CF6) no-repeat center / 100% 2px !important; }
.vline { background: none; }

/* sidebar boxes: stacked table cells become one dark card with a coloured top edge */
.blue-topbg, .orange-topbg, .green-topbg, .white-topbg, .orangebig-topbg, .bluebig-topbg {
  background: var(--pv-surface) !important;
  height: 10px;
  border: 1px solid var(--pv-line); border-bottom: 0;
  border-top: 4px solid var(--pv-cyan);
  border-radius: 14px 14px 0 0;
}
.orange-topbg, .orangebig-topbg { border-top-color: var(--pv-orange); }
.green-topbg { border-top-color: #10B981; }
.white-topbg { border-top-color: var(--pv-violet); }
.blue-footerbg, .orange-footerbg, .green-footerbg, .white-footerbg, .orangebig-footerbg, .bluebig-footerbg {
  background: var(--pv-surface) !important;
  height: 10px;
  border: 1px solid var(--pv-line); border-top: 0;
  border-radius: 0 0 14px 14px;
}
.bluebg, .orangebg, .greenbg, .whitebg, .orangebig-bg, .bluebig-bg {
  background: var(--pv-surface) !important;
  border-left: 1px solid var(--pv-line) !important;
  border-right: 1px solid var(--pv-line) !important;
}
/* partners page: accordion title bars */
.maindivtitel h1, .accordion_toggle, .accordion_toggle_active {
  background: var(--pv-surface-2) !important;
  color: var(--pv-ink) !important;
  border: 1px solid var(--pv-line) !important;
  border-left: 3px solid var(--pv-orange) !important;
  border-image: none !important;
  border-radius: 8px;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 700;
  box-sizing: border-box;
}
/* partner logos are drawn for white backgrounds: show them on small white tiles */
.content-partner td[align="center"] img { background: #fff; padding: 8px 10px; border-radius: 10px; box-sizing: content-box; }
.content-partner { background: var(--pv-surface) !important; border: 1px solid var(--pv-line) !important; border-radius: 16px; overflow: hidden; color: var(--pv-text); }
.leftpart-partner, .products-content, .rightpart-news { color: var(--pv-text); }

/* old right-hand tab widget (news pages) */
.tabs-container, .rightpart > #container-4 > .tabs-container { background: var(--pv-surface) !important; border-color: var(--pv-line) !important; }

/* lists that used tiny arrow gifs */
.newsli li, .learn li, .products li, .temp li { background: none; position: relative; }
.newsli li::before, .learn li::before, .products li::before, .temp li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, #FF4F06, #EC4899);
}
li::marker { color: var(--pv-orange); }

/* forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input:not([type]), textarea, select {
  background: var(--pv-surface-2) !important;
  border: 1px solid var(--pv-line-strong) !important;
  border-radius: 8px;
  padding: 5px 8px !important;
  font-size: 13px;
  color: var(--pv-ink) !important;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--pv-pink) !important; box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.22);
}
.textfieldRequiredState input, .textfieldInvalidFormatState input, .textfieldMinCharsState input,
.textareaRequiredState textarea, .selectRequiredState select, .selectInvalidState select {
  background: rgba(239, 68, 68, 0.12) !important; border-color: #EF4444 !important;
}
.textfieldRequiredMsg, .textareaRequiredMsg, .textfieldInvalidFormatMsg, .selectRequiredMsg { color: #FCA5A5 !important; }
input[type="submit"], input[type="button"], input[type="reset"], button {
  background: linear-gradient(90deg, #FF4F06, #EC4899);
  color: #fff; border: 0; border-radius: 999px;
  padding: 9px 22px; font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.25);
}
input[type="reset"] { background: var(--pv-surface-2); color: var(--pv-ink); box-shadow: none; border: 1px solid var(--pv-line-strong); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--pv-orange); }

/* ---------- partner logo bar (whole bar links to Technology Partners) ---------- */
/* one row of light, transparent logos; each logo has its own size (set in the HTML) so they look optically even */
.pv-partners {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin: 24px 0 0;
  padding: 26px 36px;
  background: var(--pv-surface);
  border: 1px solid var(--pv-line);
  border-radius: 16px;
  line-height: 0;
  transition: border-color .2s ease;
}
.pv-partners img { display: block; flex: 0 0 auto; border-radius: 0 !important; border: 0 !important; opacity: .78; transition: opacity .2s ease; }
.pv-partners:hover { border-color: rgba(236, 72, 153, 0.45); }
.pv-partners:hover img { opacity: 1; }

/* ---------- footer ---------- */
div#footer {
  width: 100vw;
  margin: 28px 0 0 calc(50% - 50vw);
  height: auto;
  padding: 26px 0 30px;
  border: 0;
  border-top: 1px solid var(--pv-line);
  background: radial-gradient(600px 220px at 85% 0%, rgba(139, 92, 246, 0.22), transparent 70%),
              radial-gradient(500px 200px at 0% 100%, rgba(255, 79, 6, 0.16), transparent 70%),
              #050D24;
  color: var(--pv-muted);
  font-size: 13px;
  position: relative;
}
div#footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--pv-grad); }
div#footer table { width: 980px !important; margin: 0 auto; background: none; height: auto; }
div#footer td, div#footer span { color: var(--pv-muted); font-size: 13px; }
div#footer a { color: var(--pv-ink); font-size: 13px; }
div#footer a:hover { color: var(--pv-orange-soft); }
div#footer [itemprop="name"] { color: var(--pv-ink); font-weight: 700; }

/* AI-style sections are already dark: a faint outline separates them from the page background */
.aiw-section { box-shadow: 0 0 0 1px var(--pv-line); }

@media (prefers-reduced-motion: reduce) {
  .pv-header .menu a, .pv-partners { transition: none; }
}

/* ---------- responsive: tablets ---------- */
@media (max-width: 1000px) {
  div#mainwrapper { width: auto !important; padding: 0 16px; }
  .pv-header-in, div#footer table { width: auto !important; }
  .pv-header-in { padding: 0 16px; }
  div#footer { padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
  div#footer table { width: 100% !important; }
  .aiw-cards.iot-3, .aiw-cards.bkp-3 { grid-template-columns: repeat(2, 1fr); }
  .aiw-steps[style] { grid-template-columns: repeat(2, 1fr) !important; }
  img { max-width: 100%; height: auto; }
  .pv-partners { flex-wrap: wrap; justify-content: center; gap: 22px 34px; padding: 22px; }
  /* page-specific layouts */
  .iot-keys { grid-template-columns: repeat(5, 1fr); }
  .xe-frame { width: auto; }
  .xe-screen { aspect-ratio: auto; grid-template-columns: repeat(3, 1fr); }
  .iot-event { grid-template-columns: 1fr; }
  .iot-event .arrow { transform: rotate(90deg); }
}

/* ---------- responsive: narrow tablets ---------- */
@media (max-width: 900px) {
  /* not enough room for five links next to the logo: they move into the side menu */
  .pv-header .menu a { display: none !important; }
}

/* ---------- responsive: phones ---------- */
@media (max-width: 760px) {
  html, body { font-size: 16px; }
  body { padding-top: 84px !important; }
  div#mainwrapper { padding: 0 12px; }
  .pv-header-in { height: 64px; padding: 0 14px; }
  .pv-header { height: 67px; }
  .pv-logo { top: -3px; }
  .pv-logo img { width: 200px; }
  /* phones: only the logo and the menu button; every link is in the side menu */
  .pv-header .menu a { display: none !important; }
  .pv-burger { width: 44px; height: 44px; }
  .pv-drawer li a { font-size: 16px; padding: 10px 10px; }
  .pv-drawer summary, .pv-drawer-home { font-size: 17px; }
  td, th, p, li, label, .contentfont12, .contentfont { font-size: 15px; }
  input[type="text"], input[type="email"], input[type="tel"], input:not([type]), textarea, select { font-size: 16px !important; max-width: 100%; }
  .pv-partners { gap: 18px 26px; padding: 18px 12px; }
  .pv-partners img { transform: scale(.9); }
  div#footer, div#footer td, div#footer span, div#footer a { font-size: 14px; }
  div#footer td { display: block; width: auto !important; text-align: center !important; padding: 4px 0; }
  /* every multi-column grid becomes one column on phones (also overrides page-level and inline grids) */
  .aiw-hero, .aiw-split, .aiw-media, .aiw-side, .aiw-cards, .aiw-stack, .aiw-steps, .aiw-trust, .aiw-figs,
  .aiw-cards.iot-3, .aiw-cards.bkp-3, .aiw-steps[style], .aiw-cards[style] { grid-template-columns: 1fr !important; }
  /* page-specific layouts */
  .iot-keys { grid-template-columns: repeat(3, 1fr); }
  .xe-screen { grid-template-columns: 1fr 1fr; }
  .tp-hero-logos { grid-template-columns: 1fr 1fr; }
  .bkp-stats { grid-template-columns: repeat(2, 1fr) !important; }
  .bkp-workloads { grid-template-columns: 1fr !important; }
  /* legacy form tables: stack every cell so fields and checkbox groups read top to bottom */
  .aiw-form table, .aiw-form tbody, .aiw-form tr, .aiw-form td { display: block; width: auto !important; height: auto !important; }
  .aiw-form td { padding: 3px 0; }
  .aiw-form input[type="text"], .aiw-form textarea, .aiw-form select { width: 100% !important; box-sizing: border-box; }
  .aiw-form input[type="checkbox"], .aiw-form input[type="radio"] { width: 20px; height: 20px; }
}
