/* ============================================================
   Hero aller öffentlichen Seiten („Terrain“)

   Volle Breite, eine große Überschrift und ein Satz.
   Dahinter das lebende Gebirge aus static/js/site_hero_terrain.js
   (WebGL auf dem Canvas). Ohne WebGL oder bis die Szene bereit ist,
   zeigt der Farbverlauf samt Glühen darunter dasselbe Bild in Ruhe.
   Markup: partials/public_page_hero.html. Die Startseite
   (templates/landing.html) nutzt die kompakte Variante „--home“: Gebirge
   gedämpft, dazu das Stadt-Bild – siehe Abschnitt weiter unten.
   ============================================================ */

/* Schriften selbst gehostet – keine Anfrage an Google (DSGVO).
   Lizenzen: static/fonts/inter-tight/OFL.txt, static/fonts/instrument-serif/OFL.txt */
@font-face {
  font-family: 'Ouhud Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/inter-tight/latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Ouhud Display';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/inter-tight/latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Ouhud Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/instrument-serif/latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Ouhud Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/instrument-serif/latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Bühne ---------- */
.site-hero {
  --site-hero-pad: clamp(1.25rem, 5vw, 4.5rem);
  --site-hero-teal: #64e2ce;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  display: grid;
  align-content: end;
  min-height: clamp(30rem, 64svh, 46rem);
  padding: 5.5rem var(--site-hero-pad) clamp(2.5rem, 6vh, 4rem);
  color: #fff;
  /* Rückfall und Startbild: dieselbe Verlaufsform zeichnet auch die Szene. */
  background: radial-gradient(120% 90% at 72% 18%, #0d2460 0%, #071a3f 42%, #040b1f 100%);
}

.site-hero__scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.4s cubic-bezier(.2, .7, .2, 1), transform 1.8s cubic-bezier(.2, .7, .2, 1);
}
.site-hero__scene.is-ready { opacity: 1; transform: none; }

/* Glühen hinter dem Gipfel – sichtbar, solange die Szene nicht läuft. */
.site-hero__glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  translate: -50% -50%;
}
.site-hero__glow--blue {
  left: 72%;
  top: 14%;
  width: min(72vw, 860px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(79, 134, 255, .55) 0%, rgba(79, 134, 255, .16) 32%, transparent 62%);
  animation: site-hero-glow 9s ease-in-out infinite;
}
.site-hero__glow--teal {
  left: 74%;
  top: 18%;
  width: min(34vw, 380px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(100, 226, 206, .35), transparent 60%);
  animation: site-hero-glow 11s ease-in-out -4s infinite;
}
@keyframes site-hero-glow {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}

/* Abdunkeln links und unten, damit der Text sicher lesbar bleibt. */
.site-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 11, 31, .72) 0%, rgba(4, 11, 31, .35) 38%, rgba(4, 11, 31, 0) 62%),
    linear-gradient(180deg, rgba(4, 11, 31, .35) 0%, rgba(4, 11, 31, 0) 28%, rgba(4, 11, 31, 0) 60%, rgba(4, 11, 31, .78) 100%);
}
.site-hero__grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- Text ---------- */
.site-hero__inner {
  position: relative;
  z-index: 4;
  max-width: 1180px;
  min-width: 0;
}
.site-hero__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.25rem;
  margin-bottom: 1.25rem;
  animation: site-hero-fade-up .8s cubic-bezier(.19, 1, .22, 1) .2s both;
}
.site-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  margin: 0 0 1.3rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
  animation: site-hero-fade-up .9s cubic-bezier(.19, 1, .22, 1) .3s both;
}
.site-hero__kicker::before {
  content: "";
  flex: none;
  width: 2rem;
  height: 1px;
  background: var(--site-hero-teal);
  opacity: .85;
}
.site-hero__title {
  margin: 0;
  font-family: 'Ouhud Display', 'Inter Tight', var(--font-sans, sans-serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 7.1vw, 7.2rem);
  line-height: .94;
  /* Leicht eng, aber nicht enger: Bei -.045em klebten „rr“ und „ri“
     in „Karriere“ aneinander. */
  letter-spacing: -.028em;
  text-wrap: balance;
  /* Lange Titel trennen nur am weichen Trennzeichen (Software­entwicklung). */
  hyphens: manual;
}
.site-hero--long .site-hero__title { font-size: clamp(2.4rem, 6.2vw, 6.2rem); }
.site-hero--xlong .site-hero__title { font-size: clamp(2rem, 4.6vw, 4.6rem); line-height: 1.02; }
.site-hero__w {
  display: inline-block;
  /* Maske: Das Wort steigt von unten herein; Unterlängen bleiben sichtbar. */
  clip-path: inset(-12% -4% -28% -4%);
}
.site-hero__wi {
  display: inline-block;
  transform: translateY(112%);
  animation: site-hero-word-up 1s cubic-bezier(.19, 1, .22, 1) forwards;
  animation-delay: calc(90ms + var(--i, 0) * 70ms);
}
.site-hero__title em {
  font-family: 'Ouhud Serif', 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.06em;
  letter-spacing: -.01em;
  padding-inline-end: .03em;
  color: var(--site-hero-teal);
}
.site-hero__dot {
  display: inline-block;
  color: var(--site-hero-teal);
  animation: site-hero-pop .5s cubic-bezier(.2, 1.4, .4, 1) .55s both;
}
.site-hero__lead {
  max-width: 40rem;
  margin: 1.6rem 0 0;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  font-weight: 500;
  line-height: 1.55;
  /* Deckend weiß statt Grau: Der Satz muss auf jeder Seite gut lesbar sein. */
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 1px 2px rgba(4, 11, 31, .45);
  animation: site-hero-fade-up .9s cubic-bezier(.19, 1, .22, 1) .5s both;
}

.site-hero--subpage { min-height: clamp(30rem, 58svh, 42rem); }
.site-hero--subpage .site-hero__title { font-size: clamp(3rem, 7vw, 6.5rem); overflow-wrap: anywhere; }
.site-hero--subpage.site-hero--long .site-hero__title { font-size: clamp(2.5rem, 5.6vw, 5.5rem); }
.site-hero--subpage .site-hero__lead { max-width: 48rem; }
.site-hero__extra { position: relative; z-index: 4; max-width: 48rem; margin-top: 1.5rem; animation: site-hero-fade-up .9s cubic-bezier(.19, 1, .22, 1) .65s both; }

/* The landing page's broad letter-spacing reset comes later in the cascade. */
body.landing-dark .site-hero__kicker { letter-spacing: .16em; }
body.landing-dark .site-hero__title { letter-spacing: -.028em; }
body.landing-dark .site-hero__title em { letter-spacing: -.01em; }

/* ---------- Bewegung ---------- */
@keyframes site-hero-word-up { to { transform: translateY(0); } }
@keyframes site-hero-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes site-hero-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes site-hero-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }

/* ---------- Arabisch (rechts nach links) ---------- */
[dir="rtl"] .site-hero {
  background: radial-gradient(120% 90% at 28% 18%, #0d2460 0%, #071a3f 42%, #040b1f 100%);
}
[dir="rtl"] .site-hero__glow--blue { left: 28%; }
[dir="rtl"] .site-hero__glow--teal { left: 26%; }
[dir="rtl"] .site-hero__shade {
  background:
    linear-gradient(270deg, rgba(4, 11, 31, .72) 0%, rgba(4, 11, 31, .35) 38%, rgba(4, 11, 31, 0) 62%),
    linear-gradient(180deg, rgba(4, 11, 31, .35) 0%, rgba(4, 11, 31, 0) 28%, rgba(4, 11, 31, 0) 60%, rgba(4, 11, 31, .78) 100%);
}
/* Arabische Glyphen haben höhere Ober- und Unterlängen; die enge
   Zeilenhöhe der lateinischen Überschrift würde sie abschneiden. */
[dir="rtl"] .site-hero__title { font-family: var(--font-sans, sans-serif); line-height: 1.18; }
[dir="rtl"] .site-hero__title em { font-family: inherit; font-style: normal; }

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  .site-hero { min-height: 27rem; padding-top: 4.5rem; }
  .site-hero--subpage { min-height: 27rem; }
  .site-hero--subpage .site-hero__title { font-size: clamp(2.5rem, 10vw, 4rem); }
  .site-hero--subpage.site-hero--long .site-hero__title { font-size: clamp(1.8rem, 8.8vw, 3.4rem); }
  .site-hero__title { font-size: clamp(2.5rem, 11.5vw, 4rem); }
  .site-hero--long .site-hero__title { font-size: clamp(2.1rem, 9.6vw, 3.4rem); }
  .site-hero--xlong .site-hero__title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .site-hero__glow--blue { left: 82%; top: 22%; width: 120vw; }
  .site-hero__glow--teal { left: 84%; top: 24%; width: 55vw; }
  [dir="rtl"] .site-hero__glow--blue { left: 18%; }
  [dir="rtl"] .site-hero__glow--teal { left: 16%; }
}
@media (max-width: 380px) {
  .site-hero--subpage.site-hero--long .site-hero__dot { display: none; }
}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .site-hero__wi { transform: none; animation: none; }
  .site-hero__topline,
  .site-hero__kicker,
  .site-hero__dot,
  .site-hero__lead,
  .site-hero__glow { animation: none; }
  .site-hero__scene { transition: none; transform: none; }
}

/* ============================================================
   Startseite („--home“): dieselbe Bühne wie der zentrale Hero von
   ouhud.com (Hamza_web, x-site-hero) – gleiche Höhe
   clamp(30rem, 64svh, 46rem), gleicher Seitenabstand, Text unten links.
   Höhe und Abstände erbt sie deshalb unverändert von .site-hero. Das
   Gebirge läuft gedämpft dahinter, das Stadt-Bild
   (static/img/landing/hero-city.*) steht rechts unten bis an den Rand.
   Im Arabischen spiegelt sich alles.
   ============================================================ */
.site-hero--home {
  /* Farben aus der Bildvorlage: tiefes Marine, rechts oben ein blauer Schein.
     Sie scheinen durch das gedämpfte Gebirge hindurch. */
  background:
    radial-gradient(48% 80% at 88% 0%, rgba(56, 80, 156, .55) 0%, rgba(56, 80, 156, 0) 72%),
    linear-gradient(90deg, #080d24 0%, #0c1633 55%, #101c40 100%);
}
[dir="rtl"] .site-hero--home {
  background:
    radial-gradient(48% 80% at 12% 0%, rgba(56, 80, 156, .55) 0%, rgba(56, 80, 156, 0) 72%),
    linear-gradient(270deg, #080d24 0%, #0c1633 55%, #101c40 100%);
}
/* Das Gebirge nur als leiser Hintergrund, nicht als Blickfang. */
.site-hero--home .site-hero__scene.is-ready { opacity: .45; }
.site-hero--home .site-hero__shade {
  background:
    linear-gradient(90deg, rgba(4, 11, 31, .55) 0%, rgba(4, 11, 31, .2) 45%, rgba(4, 11, 31, 0) 70%),
    linear-gradient(180deg, rgba(4, 11, 31, 0) 55%, rgba(4, 11, 31, .45) 100%);
}
[dir="rtl"] .site-hero--home .site-hero__shade {
  background:
    linear-gradient(270deg, rgba(4, 11, 31, .55) 0%, rgba(4, 11, 31, .2) 45%, rgba(4, 11, 31, 0) 70%),
    linear-gradient(180deg, rgba(4, 11, 31, 0) 55%, rgba(4, 11, 31, .45) 100%);
}
.site-hero--home .site-hero__inner { max-width: none; }
/* Auf breiten Fenstern so groß wie der zentrale Hero (7.2rem); darunter
   wächst sie langsamer, damit „professionell“ links vor der Stadt endet. */
.site-hero--home .site-hero__title {
  --site-hero-city: min(46vw, 1000px);
  font-size: clamp(2.4rem, 5.7vw, 7.2rem);
  line-height: .98;
  /* Längere Sprachen (Ukrainisch, Russisch) brechen um, bevor die Zeile
     in die deckende Stadt läuft (Bildmaske ab 18 % der Bildbreite). */
  max-width: calc(100% + var(--site-hero-pad) - var(--site-hero-city) * .82);
}
.site-hero--home .site-hero__line { display: block; }
/* Arabisch läuft breiter und mit höherer Zeile: etwas kleiner, damit die
   erste Zeile wie im Deutschen in einer Zeile bleibt. Die RTL-Zeilenhöhe
   (1.18) muss hier wieder gelten, sonst schneidet die Wortmaske in Safari
   die Schadda über „أعدّ“ ab. */
[dir="rtl"] .site-hero--home .site-hero__title { font-size: clamp(2.1rem, 4.8vw, 5.4rem); line-height: 1.18; }
/* Japanisch/Chinesisch: Die Serifenschrift hat keine CJK-Zeichen – sonst
   neigt der Browser die Ersatzschrift künstlich. */
:lang(ja) .site-hero__title em,
:lang(zh) .site-hero__title em { font-style: normal; }
.site-hero--home .site-hero__lead {
  max-width: 34em;
  font-size: clamp(1rem, 1.1vw, 1.35rem);
  /* Kein einzelnes Wort allein in der letzten Zeile (z. B. Arabisch, Ukrainisch). */
  text-wrap: pretty;
}

/* Das Bild sitzt unten am Ende der Zeile und läuft bis an den Rand.
   Oben und zum Text hin blendet eine Maske es weich in den Hintergrund. */
.site-hero__city { display: contents; }
.site-hero__city-img {
  position: absolute;
  z-index: 3;
  inset-inline-end: 0;
  bottom: 0;
  display: block;
  width: min(46%, 1000px);
  height: auto;
  max-height: 100%;
  aspect-ratio: 1100 / 615;
  /* Wird der Platz flacher als das Bild (breite Fenster), fällt oben und
     unten etwas Netz weg – die Stadt selbst bleibt ganz. */
  object-fit: cover;
  object-position: 75% 50%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 24%), linear-gradient(180deg, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 24%), linear-gradient(180deg, transparent 0%, #000 22%);
  mask-composite: intersect;
  animation: site-hero-fade 1.2s ease .2s both;
}
/* Im Arabischen steht die Stadt links, gespiegelt; die Maske spiegelt mit. */
[dir="rtl"] .site-hero__city-img { transform: scaleX(-1); }

/* Schmale Tablets: der Satz bleibt links vom Bild. */
@media (min-width: 761px) and (max-width: 1023px) {
  .site-hero__city-img { width: 44%; }
  .site-hero--home .site-hero__title { --site-hero-city: 44vw; }
  .site-hero--home .site-hero__lead { max-width: 56%; }
}

/* Handy: Text zuerst, das Bild darunter in voller Breite. */
@media (max-width: 760px) {
  .site-hero--home {
    min-height: 0;
    padding: 2.25rem 1.25rem 0;
  }
  .site-hero--home .site-hero__title { font-size: clamp(2rem, 9.2vw, 3.2rem); max-width: none; }
  [dir="rtl"] .site-hero--home .site-hero__title { font-size: clamp(1.8rem, 8.2vw, 2.8rem); }
  .site-hero__city-img {
    position: static;
    width: calc(100% + 2.5rem);
    max-width: none;
    max-height: none;
    margin: .25rem -1.25rem 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-hero__city-img { animation: none; }
}

/* CRM dashboard preview directly below the hero. */
.o-hero-showcase,
.o-hero-showcase * { box-sizing: border-box; }
.o-hero-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(4rem, 7vw, 7rem) 1.5rem;
  color: #f8fafc;
  background: radial-gradient(circle at 50% 0, #163b82 0, #0b245b 32%, #091a4a 72%);
}
.o-hero-showcase::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .45;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.o-showcase-shell { width: min(1180px, 100%); margin: auto; }
.o-showcase-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.o-showcase-eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 .7rem;
  color: #9dc7ff;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
body.landing-dark .o-showcase-eyebrow { letter-spacing: .15em; }
.o-showcase-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: #64e2ce; box-shadow: 0 0 16px #64e2ce; }
.o-showcase-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
}
body.landing-dark .o-showcase-heading h2 { letter-spacing: -.035em; }
.o-showcase-demo {
  flex: 0 0 auto;
  padding: .55rem .85rem;
  border: 1px solid rgba(100,226,206,.3);
  border-radius: 999px;
  color: #9df4e5;
  background: rgba(100,226,206,.1);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
body.landing-dark .o-showcase-demo { letter-spacing: .12em; }
.o-preview-window {
  overflow: hidden;
  border: 1px solid rgba(203,225,255,.4);
  border-radius: 24px;
  background: #f5f8fd;
  box-shadow: 0 32px 90px rgba(0,5,28,.35), 0 0 0 8px rgba(255,255,255,.035);
}
.o-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 54px;
  padding: .7rem 1.25rem;
  border-bottom: 1px solid #dfe8f2;
  background: #eef3f9;
  color: #263b60;
  font-size: .78rem;
  font-weight: 750;
}
.o-preview-dots { display: flex; gap: .35rem; }
.o-preview-dots i { width: 9px; height: 9px; border-radius: 50%; background: #f58b89; }
.o-preview-dots i:nth-child(2) { background: #f6c66c; }
.o-preview-dots i:nth-child(3) { background: #69d4ad; }
.o-preview-window-title { flex: 1; }
.o-preview-window-title span { color: #8292aa; font-weight: 600; }
.o-preview-window-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  color: #0b6c5c;
  background: #dff8ef;
  font-size: .68rem;
  text-transform: uppercase;
}
.o-preview-window-status span { width: 6px; height: 6px; border-radius: 50%; background: #18b891; }
.o-preview-workspace { display: grid; grid-template-columns: 96px minmax(0,1fr); }
.o-preview-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem .6rem;
  background: #0c2256;
}
.o-preview-rail strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: .7rem;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #40a5e9, #2455c4);
  font: 800 1.1rem system-ui, sans-serif;
}
.o-preview-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  width: 100%;
  padding: .6rem .2rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #9fb2d6;
  font: 700 .66rem/1.15 system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.o-preview-tab svg { width: 20px; height: 20px; }
.o-preview-tab span { max-width: 100%; overflow-wrap: normal; hyphens: auto; }
.o-preview-tab:hover { color: #fff; background: rgba(255,255,255,.08); }
.o-preview-tab:focus-visible { outline: 2px solid #64e2ce; outline-offset: 2px; }
.o-preview-tab.selected { color: #fff; background: rgba(100,226,206,.2); box-shadow: inset 0 0 0 1px rgba(100,226,206,.45); }
.o-preview-tab.selected svg { color: #64e2ce; }
.o-preview-main { min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); color: #17223c; }
.o-preview-view[hidden] { display: none !important; }
.o-preview-view { animation: o-preview-in .35s ease both; }
@keyframes o-preview-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .o-preview-view { animation: none; } }

/* Pipeline view */
.o-preview-board { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.o-preview-column { min-width: 0; padding: .9rem; border: 1px solid #dde8f5; border-radius: 16px; background: #eef3fa; }
.o-preview-column header { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; color: #173467; font-size: .82rem; }
.o-preview-column header span { color: #6b7f9e; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.o-preview-deal { display: grid; gap: .2rem; margin-top: .6rem; padding: .8rem .9rem; border: 1px solid #dde8f5; border-inline-start: 3px solid #307be0; border-radius: 12px; background: #fff; }
.o-preview-deal strong { color: #10295e; font-size: .85rem; overflow-wrap: anywhere; }
.o-preview-deal span { color: #60738e; font-size: .74rem; }
.o-preview-deal em { color: #10295e; font-size: .9rem; font-style: normal; font-weight: 800; }
.o-preview-column.is-won .o-preview-deal { border-inline-start-color: #18b891; }
.o-preview-forecast { margin-top: 1rem; padding: 1rem 1.2rem; border: 1px solid #dde8f5; border-radius: 16px; background: #fff; }
.o-preview-forecast .o-preview-panel-title span { color: #10295e; font-size: .95rem; font-weight: 800; }
.o-preview-forecast .o-preview-progress { margin-top: .7rem; }

/* Invoice view */
.o-preview-sums { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.o-preview-sums > div { min-width: 0; padding: 1rem 1.1rem; border: 1px solid #dde8f5; border-radius: 16px; background: #fff; }
.o-preview-sums span { display: block; color: #5b6f8e; font-size: .76rem; font-weight: 700; }
.o-preview-sums strong { display: block; margin-top: .35rem; color: #10295e; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 850; }
.o-preview-sums .is-overdue strong { color: #c2413b; }
.o-preview-sums .is-paid strong { color: #128a6c; }
.o-preview-invoices { margin-top: 1rem; overflow: hidden; border: 1px solid #dde8f5; border-radius: 16px; background: #fff; }
.o-preview-invoice { display: grid; grid-template-columns: 8.5rem minmax(0,1fr) 6.5rem 10rem; align-items: center; gap: .8rem; padding: .8rem 1.1rem; font-size: .82rem; }
.o-preview-invoice + .o-preview-invoice { border-top: 1px solid #edf2f9; }
.o-preview-invoice span { color: #6b7f9e; font-weight: 700; }
.o-preview-invoice strong { min-width: 0; color: #10295e; overflow-wrap: anywhere; }
.o-preview-invoice em { color: #10295e; font-style: normal; font-weight: 800; text-align: end; }
.o-preview-invoice b { justify-self: end; padding: .25rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.o-preview-invoice b.paid { color: #0f7a5f; background: #e2f6ef; }
.o-preview-invoice b.open { color: #2459b8; background: #e6eefc; }
.o-preview-invoice b.overdue { color: #b13a34; background: #fde8e6; }
.o-preview-invoice b.draft { color: #5b6f8e; background: #eef2f7; }
.o-preview-main-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.o-preview-main-head small { color: #6881a5; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.o-preview-main-head h3 { margin: .15rem 0 0; color: #10295e; font-size: 1.35rem; font-weight: 800; }
.o-preview-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #0d2a78; font-size: .85rem; font-weight: 800; }
.o-preview-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; }
.o-preview-kpi {
  --accent: #3378dc;
  position: relative;
  min-width: 0;
  min-height: 164px;
  padding: 1.1rem;
  border: 1px solid #dde8f5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(17,44,89,.045);
}
.o-preview-kpi:nth-child(2) { --accent: #14a998; }
.o-preview-kpi:nth-child(3) { --accent: #795fd5; }
.o-preview-kpi:nth-child(4) { --accent: #e6954d; }
.o-preview-kpi-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--accent); background: #f0f5fc; font-size: .85rem; }
.o-preview-kpi-icon svg { width: 17px; height: 17px; }
.o-preview-kpi p { min-height: 2.4em; margin: .8rem 0 .15rem; color: #5b6f8e; font-size: .78rem; font-weight: 700; line-height: 1.2; }
.o-preview-kpi strong { display: block; color: #10295e; font-size: clamp(1.7rem, 2.5vw, 2.3rem); font-weight: 850; line-height: 1; }
.o-preview-spark { position: absolute; inset-inline-end: 1.1rem; bottom: 1.1rem; display: flex; align-items: end; gap: 3px; height: 23px; opacity: .85; }
.o-preview-spark i { width: 4px; height: 35%; border-radius: 3px 3px 0 0; background: var(--accent); }
.o-preview-spark i:nth-child(2) { height: 50%; }
.o-preview-spark i:nth-child(3) { height: 42%; }
.o-preview-spark i:nth-child(4) { height: 67%; }
.o-preview-spark i:nth-child(5) { height: 60%; }
.o-preview-spark i:nth-child(6) { height: 82%; }
.o-preview-spark i:nth-child(7) { height: 100%; }
.o-preview-details { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,.55fr); gap: 1rem; margin-top: 1rem; }
.o-preview-chart,
.o-preview-pipeline { min-width: 0; padding: 1.2rem; border: 1px solid #dde8f5; border-radius: 16px; background: #fff; }
.o-preview-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #173467; font-size: .86rem; }
.o-preview-panel-title span { color: #7c8fa9; font-size: .72rem; font-weight: 700; }
.o-preview-chart-bars {
  display: flex;
  align-items: end;
  gap: clamp(4px, 1vw, 12px);
  height: 126px;
  margin-top: 1.2rem;
  border-bottom: 1px solid #dbe5f1;
  background: repeating-linear-gradient(to top, transparent 0, transparent 30px, #edf2f8 31px);
}
.o-preview-chart-bars i { flex: 1; height: var(--h); min-width: 0; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #62c7f0, #2460c5); }
.o-preview-pipeline { display: grid; align-content: start; gap: 1rem; }
.o-preview-progress span { display: block; margin-bottom: .4rem; color: #60738e; font-size: .72rem; font-weight: 700; }
.o-preview-progress i { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #e7eef7; }
.o-preview-progress i::before { content: ""; display: block; width: var(--fill); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #307be0, #62d6ca); }
.o-showcase-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-top: 1.3rem; }
.o-showcase-metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .7rem;
  min-width: 0;
  padding: 1.15rem .8rem;
  border: 1px solid rgba(182,214,255,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
}
.o-showcase-metrics strong { color: #65e1cf; font-size: 1.85rem; font-weight: 800; line-height: 1; }
.o-showcase-metrics span { color: #c6d6ef; font-size: .8rem; font-weight: 700; }
@media (max-width: 960px) {
  .o-preview-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .o-hero-showcase { padding: 3.5rem 1rem; }
  .o-showcase-heading { align-items: start; }
  .o-preview-workspace { grid-template-columns: 1fr; }
  /* On phones the menu becomes a tab bar above the content. */
  .o-preview-rail { flex-direction: row; justify-content: stretch; gap: .4rem; padding: .5rem; }
  .o-preview-rail strong { display: none; }
  .o-preview-tab { flex: 1 1 0; min-width: 0; gap: .25rem; padding: .5rem .3rem; font-size: .7rem; }
  .o-preview-tab svg { width: 18px; height: 18px; flex: 0 0 auto; }
  .o-preview-board, .o-preview-sums { grid-template-columns: 1fr; }
  .o-preview-invoice { grid-template-columns: minmax(0,1fr) auto; }
  .o-preview-invoice b { justify-self: end; }
  .o-preview-invoice span { display: none; }
  .o-preview-invoice em { text-align: start; grid-column: 1; grid-row: 2; }
  .o-preview-invoice b { grid-column: 2; grid-row: 1 / span 2; }
  .o-preview-main { padding: 1rem; }
  .o-preview-details { grid-template-columns: 1fr; }
  .o-showcase-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 380px) {
  .o-preview-window-title span { display: none; }
  .o-preview-kpi { padding: .9rem; }
  .o-preview-spark { inset-inline-end: .9rem; }
  .o-showcase-metrics > div { flex-direction: column; align-items: center; gap: .25rem; }
}
