/* CONTENSI shared technical surfaces. Existing content and behaviours stay intact. */
:root {
  --ct-edge: #28536a;
  --ct-edge-active: #16cff8;
  --ct-surface: #0b2033;
  --ct-deep: #071421;
  --ct-text: #dce9f5;
  --ct-muted: #a9bdcd;
}
body {
  --bg: #071421;
  --surface: #0b2033;
  --surface-strong: #102b40;
  --ink: #dce9f5;
  --muted: #a9bdcd;
  --line: #28536a;
  --accent: #16cff8;
  --accent-ink: #16cff8;
  --btn-bg: #16cff8;
  --btn-bg-hover: #6fe3fd;
  --btn-ink: #062032;
  color-scheme: dark;
}
/* The two nested polygon surfaces draw a true fine chamfered frame without
   clipping content, focus rings, photographs or the 3D customer-card faces. */
body :is(.karte, .pkarte, .benefit-card, .step, .cert-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat) {
  --ct-cut: 16px;
  --ct-shape: polygon(0 0,calc(100% - var(--ct-cut)) 0,100% var(--ct-cut),100% 100%,var(--ct-cut) 100%,0 calc(100% - var(--ct-cut)));
  position: relative;
  isolation: isolate;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none;
  color: var(--ct-text);
}
body :is(.karte, .pkarte, .benefit-card, .step, .cert-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat)::before,
body :is(.karte, .pkarte, .benefit-card, .step, .cert-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat)::after {
  content: "";
  position: absolute;
  pointer-events: none;
  clip-path: var(--ct-shape);
}
body :is(.karte, .pkarte, .benefit-card, .step, .cert-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat)::before {
  inset: -1px;
  z-index: -2;
  background: var(--ct-edge);
  transition: background-color 220ms ease;
}
body :is(.karte, .pkarte, .benefit-card, .step, .cert-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat)::after {
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 95% 0,rgba(22,207,248,.075),transparent 65%),linear-gradient(135deg,#0b2033,#071421 85%);
}
/* Reading cards stay visually quiet; only actual controls activate the frame. */
body :is(.karte, .pkarte, .benefit-card, .step, .cert-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat):focus-within::before { background: var(--ct-edge-active); }
@media (hover: hover) and (pointer: fine) {
  body :is(.motion-link-card, .gate, .calc, .cta-panel, .teaser):hover::before { background: #3687a5; }
}
body :is(.karte, .pkarte, .step, .benefit-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat) :is(h2,h3,h4,.p-title,.label) { color: var(--ct-text); }
body :is(.karte, .pkarte, .step, .benefit-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat) :is(p,li,.hint,.note,.p-text,.value small) { color: var(--ct-muted); }
body :is(.karte, .pkarte, .step, .benefit-card, .gate, .calc, .cta-panel, .cloud-exit-calc, .teaser, .option, .trial, .mig, .kv-bestand, .zertifikat) a:not(.btn) { color: #16cff8; }
/* Existing image cards retain full rectangular images and their exact crop.
   Their frame is chamfered only below the image, in the text area. */
body :is(.blog-kachel,.aufmacher-link,.eintrag) {
  border-radius: 0 !important;
  border-color: #28536a;
  background: radial-gradient(ellipse at 100% 100%,rgba(22,207,248,.07),transparent 70%),linear-gradient(135deg,#0b2033,#071421) !important;
  color: var(--ct-text);
  box-shadow: inset 0 -1px #28536a;
}
body :is(.blog-kachel,.aufmacher-link,.eintrag):focus-visible { outline: 2px solid #16cff8; outline-offset: 4px; }
body .blog-kachel :is(.beitrag-text,.beitrag-datum) { color: var(--ct-muted); }
body .blog-kachel .beitrag-titel { color: var(--ct-text); }
body .modulraster a {
  border-radius: 0 !important;
  border-color: var(--ct-edge);
  background: linear-gradient(135deg,#0b2033,#071421) !important;
  color: var(--ct-text);
  box-shadow: inset 2px 0 transparent;
}
body .modulraster span { color: var(--ct-text); }
body .modulraster a:hover, body .modulraster a:focus-visible {
  border-color: #16cff8;
  box-shadow: inset 2px 0 #16cff8;
  background: #0b3045 !important;
}
/* Controls share the same precise cut, with inset focus to survive clipping. */
body :is(.btn,.nav-links a.nav-cta) {
  border-radius: 0 !important;
  clip-path: polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,9px 100%,0 calc(100% - 9px));
  background-color: #16cff8;
  color: #062032;
  box-shadow: none;
}
body :is(.btn,.nav-links a.nav-cta):focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: -5px;
  box-shadow: inset 0 0 0 1px #062032;
}
body :is(.btn-secondary, .btn.btn-secondary) { background: #0b2033; color: #16cff8; border: 1px solid #34718c; }
body :is(.btn-secondary,.btn.btn-secondary):hover { background: #0b3045; color: #b8f1ff; }
body :is(.nav-dropdown,dialog) {
  border-radius: 0 !important;
  border: 1px solid #28536a;
  background: radial-gradient(ellipse at top right,rgba(22,207,248,.06),transparent 70%),#0a1c2b;
  color: #dce9f5;
  box-shadow: 0 16px 40px rgb(0 0 0 / 25%);
}
body .nav-dropdown a { border-radius: 0; color: #dce9f5; }
body .nav-dropdown a:hover, body .nav-dropdown a:focus-visible { background: #0b3045; color: #16cff8; }
body :is(.such-knopf,.nav-toggle,.dlg-close,.cert-pause,.ki-reset,.mig-controls button,.social a,.social button,.back-to-top) {
  border-radius: 0 !important;
  border-color: #28536a;
}
body :is(.such-kopf,.dlg-kopf,.doc-kopf) { border-color: #28536a; }
body .such-ergebnisse a { border-radius: 0; color: #dce9f5; }
body .such-ergebnisse a:hover,body .such-ergebnisse a.aktiv { background: #0b3045; }
body .such-treffer-text { color: #a9bdcd; }
body dialog::backdrop { background: rgb(3 11 19 / 75%); }
/* All existing input workflows keep their semantics and native controls. */
body :is(.fld input,.fld textarea,.fld select,.ci input,.ci select,.cloud-exit-calc input,.cloud-exit-calc select,.such-kopf input) {
  border-radius: 0 !important;
  background: #071724;
  color: #e4edf6;
  border: 1px solid #36586c;
  box-shadow: inset 2px 0 #1c3b50;
  transition: border-color 200ms ease,box-shadow 200ms ease;
}
body :is(.fld input,.fld textarea,.fld select,.ci input,.ci select,.cloud-exit-calc input,.cloud-exit-calc select,.such-kopf input):focus-visible {
  border-color: #16cff8;
  outline: 2px solid #16cff8;
  outline-offset: 2px;
  box-shadow: inset 2px 0 #16cff8;
}
body input::placeholder, body textarea::placeholder { color: #92a9bd; opacity: 1; }
body :is(input[type="checkbox"],input[type="radio"],input[type="range"]) { accent-color: #16cff8; }
body :is(.calc-inputs,.calc-row,.calc-result,.seg,.ci-money,.calc-bar,.job-tags span,.nextcloud-table-wrap,.nextcloud-table th,.nextcloud-table td) { border-color: #28536a; border-radius: 0; }
body .calc-inputs { background: rgba(22,207,248,.035); }
body .calc-row { background: transparent; }
body :is(.seg span,.ki-step,.ci-money span) { border-radius: 0; }
body .nextcloud-table-wrap { background: #0a1c2b; }
body .nextcloud-table :is(th,td,caption) { color: #c1d2df; }
/* Portraits and logo assets are untouched; the surrounding frames become crisp. */
body :is(.p-bild,.cert-image,.benefit-icon,.partner-strip,.cert-strip) { border-radius: 0 !important; }
body .p-bild { border-color: #28536a; }
body .p-karte figcaption { border-top: 1px solid #28536a; padding-top: .625rem; }
body .p-karte .p-name { color: #dce9f5; }
body .p-karte .p-rolle { color: #a9bdcd; }
body .cert-image { border: 1px solid #36586c; }
body .cert-card .cert-name { color: #c1d2df; }
body .tech-logos { border-top: 1px solid #28536a; border-bottom: 1px solid #28536a; }
body .refs li { border-radius: 0 !important; background: #0b2033 !important; border-color: #28536a; color: #c1d2df; }
body .refs .ref-cta { background: #0b3045 !important; border-color: #16cff8; animation: none; box-shadow: none; }
body .refs .ref-cta a { color: #16cff8; }
/* Preserve the original card flip, scrollable backs and touch layouts. */
body :is(.pk-innen,.pk-vorn,.pk-hinten) { border-radius: 0 !important; }
body .pk-hinten { background: radial-gradient(ellipse at top right,rgba(22,207,248,.08),transparent 70%),linear-gradient(135deg,#0b2033,#071421); border-color: #28536a; }
body .pk-vorn { border-color: #28536a; }
body .job-tags span { background: #0a1c2b; }
body .job-block { border-color: #28536a; }
body .step-num,body .karte-num,body .nr { color: #16cff8; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  body .nav-dropdown { background: transparent; border: none; box-shadow: none; }
}
@media (max-width: 560px) {
  body :is(.karte,.pkarte,.benefit-card,.step,.cert-card,.gate,.calc,.cta-panel,.cloud-exit-calc) { --ct-cut: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body :is(.karte,.pkarte,.benefit-card,.step,.cert-card,.gate,.calc,.cta-panel,.cloud-exit-calc)::before,
  body :is(.fld input,.fld textarea,.fld select,.ci input,.ci select,.cloud-exit-calc input,.cloud-exit-calc select,.such-kopf input) { transition: none !important; }
}
@media (forced-colors: active) {
  body :is(.karte,.pkarte,.benefit-card,.step,.cert-card,.gate,.calc,.cta-panel,.cloud-exit-calc) { border: 1px solid CanvasText !important; }
  body :is(.btn,.nav-links a.nav-cta) { clip-path: none; border: 1px solid ButtonText; }
}

body :is(.teaser-logo,.hero-marken img,.tech-logos .tl img,.hero-bild,.bt-bild,.private-ai-hardware,.zertifikat img,.beitrag-link,.nav-links a,.sprachumschalter a,.sprachumschalter span) { border-radius: 0 !important; }
body :is(.p-mark,.step-num,.option .badge,.kv-massnahmen li,.kv-teile li,.kundenband li) { border-radius: 0; border: 1px solid #28536a; background: #0b3045; color: #16cff8; box-shadow: none; }
body .calc-bar .bar { border-radius: 0; }
