/* ==========================================================================
   GLASBOX UI SYSTEM — ultra-clean (2026)
   - Deterministic z-index stack
   - Single-source topbar sizing (safe-area aware)
   - Mobile drawer sidebar without !important hacks
   - Dark mode via CSS variables (no global color overrides)
   ========================================================================== */

/* ==========================================================================
   1) Design Tokens
   ========================================================================== */

:root{
  --font-ui: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-mono: "Inter", system-ui, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --topbar-fade-strong: rgba(255,255,255,0.92);
  --topbar-fade-mid: rgba(255,255,255,0.78);
  --topbar-fade-weak: rgba(255,255,255,0.00); 

  /* Surfaces */
  --bg: #fbfbfc;
  --bg-elev: #ffffff;
  --bg-elev-2: #f6f7f9;
  --bg-surface: #ffffff; /* used by sticky topbar */

  /* Text */
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.62);

  /* Borders */
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.16);

  /* Accents */
  --green: #e37400;
  --amber: #e37400;
  --ring: rgba(24, 128, 56, 0.22);

  /* Radii & shadows */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow:    0 10px 30px rgba(15,23,42,0.08);

  /* Layout */
  --content-max: 1040px;

  /* Strict z-index hierarchy */
  --z-content: 10;
  --z-topbar: 100;
  --z-overlay: 800;
  --z-sidebar: 900;
  --z-modal: 2000;
  --z-consent: 2100;

  /* Topbar sizing (single source of truth) */
  --topbar-h: 80px;
}

html[data-theme="dark"]{
  --bg: #0b0f14;
  --bg-elev: #0f151d;
  --bg-elev-2: #0c1118;
  --bg-surface: #0b0f14;

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.64);

  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);

  --ring: rgba(24, 128, 56, 0.28);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30);
  --shadow:    0 14px 40px rgba(0,0,0,0.35);

  --topbar-fade-strong: rgba(11,15,20,0.92);
  --topbar-fade-mid: rgba(11,15,20,0.72);
  --topbar-fade-weak: rgba(11,15,20,0.00);

}

/* ==========================================================================
   2) Base / Reset
   ========================================================================== */

*{ box-sizing:border-box; }
html, body { height: 100%; overflow: hidden; }

body{
  margin:0;
  font-family:var(--font-ui);
  color:var(--text);
  background: var(--bg);
  overflow: hidden; /* critical: disable page scroll */
  transition: background-color .18s ease, color .18s ease, opacity .18s ease;
}

body.fade-init{ opacity:0; }
body.fade-ready{ opacity:1; }

a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }

:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* ==========================================================================
   3) App Shell Layout
   ========================================================================== */

.app-shell{
  height: 100vh;
  height: 100dvh; /* critical: fixes flex height so .content can overflow */
  width: 100%;
  display:flex;
  position: relative;
}

/* Main column */
.main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow:visible; /* topbar sticky requires visible, scroll lives in .content */
  min-height: 0;
}

/* Content area (scroll container) */
.content{
  flex: 1;
  min-height: 0; /* critical: flex/overflow scroll fix */
  overflow: auto;                  /* only this element scrolls */
  -webkit-overflow-scrolling: touch; /* iOS momentum scroll */
  overscroll-behavior-y: auto;     /* allow pull-to-refresh on supported devices */
  padding: 28px 22px 80px;
  scroll-behavior: smooth;
}

/* View routing */
.view-section{
  display:none;
  max-width: var(--content-max);
  margin: 0 auto;
  animation: fadeUp .22s ease-out;
}
.view-section.active{ display:block; }

@keyframes fadeUp{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ==========================================================================
   4) Overlay + Sidebar
   ========================================================================== */

.sidebar-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(2px);
  display:none;
  z-index: var(--z-overlay);
  cursor: pointer;
}
.sidebar-overlay.show{ display:block; }

.sidebar{
  width: 272px;
  height: 100vh;
  position: sticky; /* desktop default */
  top: 0;

  display:flex;
  flex-direction:column;
  padding: 16px;

  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  border-right:1px solid var(--border);
  z-index: var(--z-sidebar);
}

.sidebar-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:40px;
  margin-bottom: 14px;
}

.logo-area{
  display:flex;
  align-items:center;
  gap:10px;
  padding-left: 10px;
  letter-spacing:-0.5px;
  font-weight:800;
  font-size: 16px;
}
.logo-hash{ color: var(--amber); }
.logo-text{ color: var(--text); }

.sidebar-cta{ margin: 10px 0 14px; }

.nav-menu{
  flex:1;
  display:flex;
  flex-direction:column;
  gap: 4px;
  overflow:auto;
  padding-right: 2px;
}

.nav-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
  margin: 14px 0 8px 12px;
}

.nav-item{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.nav-item .icon{
  font-family:"Material Icons";
  font-size:18px;
  line-height:1;
  color: color-mix(in srgb, var(--muted) 92%, transparent);
}

.nav-item:hover{
  background: color-mix(in srgb, var(--bg-elev-2) 78%, transparent);
  color: var(--text);
  border-color: var(--border);
}
.nav-item.active{
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--text);
  border-color: color-mix(in srgb, var(--green) 22%, var(--border));
}
.nav-item.active .icon{ color: var(--green); }

.nav-spacer{ height: 14px; }

.sidebar-footer{
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.sidebar-lang .seg-btn{
  flex: 1;
  text-align: center;
}

.footer-links{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-size: 11px;
}

.ruta-ref{
  font-size: 10px;
  color: var(--muted);
  opacity: 0.6;
  line-height: 1.35;
  margin-bottom: 10px;
}

/* ==========================================================================
   5) Topbar (Sticky + Safe Area)
   ========================================================================== */

.topbar{
  /* Layout */
  display:flex;
  align-items:center;
  justify-content:space-between;
  isolation: isolate;

  /* Safe area */
  padding-top: env(safe-area-inset-top, 0px);

  /* Spacing */
  padding-left: 24px;
  padding-right: 24px;

  /* Height = base + safe-area */
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));

  /* Style */
  background: linear-gradient(
    to bottom,
    var(--topbar-fade-strong) 0%,
    var(--topbar-fade-mid) 60%,
    var(--topbar-fade-weak) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;

  /* Sticky */
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);

  transition: box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  box-shadow: none;
}

.topbar::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.topbar.scrolled{
  box-shadow: none;
}

/* Topbar Logo — visible on mobile/tablet only (sidebar hidden on desktop) */
.topbar-logo {
  display: none;
  text-decoration: none;
}

.topbar-logo .logo-hash {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1;
}

.topbar-logo .logo-text {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .topbar-logo {
    display: flex;
    align-items: center;
    gap: 6px;
  }
}

/* Desktop header: seamless white fade into content */
@media (min-width: 769px) {
  html[data-theme="light"] .topbar {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.82) 48%,
      rgba(255, 255, 255, 0) 100%
    );
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="light"] .topbar::before {
    display: none;
  }

  html[data-theme="light"] .topbar.scrolled {
    box-shadow: none;
  }
}

.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  gap: 16px;
}

.context{ display:flex; align-items:baseline; gap: 10px; }
.context-label{ color: var(--muted); }
.context-value{ font-family: var(--font-mono); font-weight: 600; }

/* ==========================================================================
   6) Core Components
   ========================================================================== */
.kpi-value--green{ color: var(--green); }

.icon{
  font-family:"Material Icons";
  font-style:normal;
  font-weight:normal;
  line-height:1;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  border-radius: 15px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor:pointer;
  transition: background .16s ease, border-color .16s ease, transform .10s ease;
}
.btn:hover{
  background: color-mix(in srgb, var(--bg-elev-2) 80%, transparent);
  border-color: var(--border-strong);
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--green);
  border-color: color-mix(in srgb, var(--green) 70%, black);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover{
  background: color-mix(in srgb, var(--green) 92%, rgb(255,255,255));
}

.btn-ghost{ width:100%; margin-top: 10px; }
.btn-full{ width:100%; border-radius: 12px; padding: 12px 14px; }

/* Icon button */
.icon-btn{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  cursor:pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.icon-btn:hover{
  background: color-mix(in srgb, var(--bg-elev-2) 80%, transparent);
  border-color: var(--border-strong);
  color: var(--text);
}
.icon-btn .icon{ font-size: 20px; }

/* Segmented control */
.segmented{
  display:inline-flex;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}
.seg-btn{
  border:0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  cursor:pointer;
}
.seg-btn[aria-pressed="true"]{
  background: color-mix(in srgb, var(--bg-elev-2) 85%, transparent);
  color: var(--text);
}

/* Typography */
h1{
  font-size: 30px;
  letter-spacing: -0.6px;
  margin: 0 0 10px;
  line-height: 1.15;
}
h2{
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.2px;
}
h3{
  font-size: 14px;
  margin: 0 0 8px;
  font-weight: 700;
}

.subtitle{
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
}
.desc{
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.7;
  max-width: 720px;
}
.muted{ color: var(--muted); }
.dot{ color: var(--muted); margin: 0 6px; }

/* Cards */
.card{
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

/* ==========================================================================
   7) Sections / Grids
   ========================================================================== */

.section-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-badges{ display:flex; gap: 8px; flex-wrap:wrap; }

.hero{
  margin-bottom: 40px;
}

.hero-copy{
  max-width: 620px;
}

.hero-title{
  font-size: 34px;
  line-height: 1.15;
}

.hero-subtitle{
  margin-top: 12px;
  margin-bottom: 24px;
}

.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-lg{
  padding: 12px 20px;
}

.pill{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.pill-green{
  border-color: color-mix(in srgb, var(--green) 26%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: color-mix(in srgb, var(--green) 92%, var(--text));
}

.hero-metrics{
  display:grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 10px;
  min-width: 320px;
}

.kpi{
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.kpi-label{
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.kpi-value{
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  margin-top: 6px;
}

/* Module section */
.module-section{ margin-top: 22px; }
.list-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.filter-box{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
  padding: 6px 10px;
  border-radius: 999px;
}

.modules-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.module-card{
  text-align:left;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor:pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  text-decoration: none;
  display: block;
}
.module-card:hover{
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.module-card:active{ transform: translateY(0); }

.module-card-highlight{
  border-color: color-mix(in srgb, var(--amber) 30%, var(--border));
  background: color-mix(in srgb, var(--amber) 6%, var(--bg-elev));
}

.module-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom: 10px;
}
.module-top .icon{ font-size: 22px; }

.badge{
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
  font-weight: 800;
}
.badge-green{
  border-color: color-mix(in srgb, var(--green) 26%, var(--border));
  color: color-mix(in srgb, var(--green) 92%, var(--text));
  background: color-mix(in srgb, var(--green) 10%, transparent);
}
.badge-amber{
  border-color: color-mix(in srgb, var(--amber) 30%, var(--border));
  color: color-mix(in srgb, var(--amber) 92%, var(--text));
  background: color-mix(in srgb, var(--amber) 10%, transparent);
}
.badge-orange{ background: var(--amber); color: white; border-color: transparent; padding: 3px 8px; }

.module-content p{
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.module-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.arrow{ font-weight: 900; }

/* Section head & offer */
.section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.offer-switch{
  display:inline-flex;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  height: fit-content;
}

.offer-btn{
  border:0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  cursor:pointer;
}
.offer-btn[aria-pressed="true"]{
  background: color-mix(in srgb, var(--bg-elev-2) 86%, transparent);
  color: var(--text);
}

.offer-grid{
  display:grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}
.offer-grid ul{
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}
.offer-grid li{ margin: 6px 0; }

.chips{ display:flex; flex-wrap:wrap; gap: 8px; margin-top: 12px; }
.chip{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elev-2) 82%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

/* Forms */
.form-grid{
  display:grid;
  grid-template-columns: 3fr 2fr;
  gap: 12px;
  margin-top: 10px;
}

.form-group{ margin-bottom: 12px; }

label{
  display:block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
  letter-spacing: .02em;
}

input, select, textarea{
  width:100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  color: var(--text);
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

textarea{ min-height: 120px; resize: vertical; }

input:focus, select:focus, textarea:focus{
  border-color: color-mix(in srgb, var(--green) 55%, var(--border));
  box-shadow: 0 0 0 4px var(--ring);
}

.consent{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.consent input{ width:auto; margin-top: 2px; }

.form-status{
  display:none;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.form-status.success{
  display:block;
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, transparent);
  color: color-mix(in srgb, var(--green) 92%, var(--text));
}
.form-status.error{
  display:block;
  border-color: rgba(217,48,37,0.35);
  background: rgba(217,48,37,0.10);
  color: rgba(217,48,37,0.95);
}

.contact-card .contact-item{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  margin-top: 12px;
}
.contact-card .contact-item .icon{ font-size: 18px; color: var(--muted); }

/* Language helpers */
.lang-en{ display:none; }
html[data-lang="en"] .lang-en{ display:block; }
html[data-lang="en"] .lang-de{ display:none; }

/* ==========================================================================
   8) Context Switcher (Business vs Engineering)
   ========================================================================== */

.view-switch{
  display: inline-flex;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 30px;
  position: relative;
  z-index: var(--z-content);
}

.view-btn{
  padding: 8px 24px;
  font-size: 13px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-btn .icon{ font-size: 16px; }

.view-btn.active{
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--border-strong);
}

html[data-theme="dark"] .view-btn.active{
  background: #1e2329;
  color: #fff;
  border-color: #30363d;
}

/* Visualization states */
.state-business{ display:block; animation: fadeIn .35s ease; }
.state-engineering{ display:none; animation: fadeIn .35s ease; }

body.mode-engineering .state-business{ display:none; }
body.mode-engineering .state-engineering{ display:block; }

/* Engineering styling hints */
body.mode-engineering .tech-highlight{ color:#1967d2; }
body.mode-engineering input,
body.mode-engineering textarea,
body.mode-engineering select{
  font-family: var(--font-mono);
  font-size: 12px;
}

@keyframes fadeIn{
  from{ opacity:0; transform: translateY(5px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ==========================================================================
   Service pages: card layouts, spec-tables, stack-grids (api/ai/seo pattern)
   ========================================================================== */

/* Page / section intro */
.page-intro{ margin-bottom: 30px; }
.page-intro .tech-font{ font-size: 32px; letter-spacing: -1px; margin-bottom: 16px; }
.page-intro .subtitle{ max-width: 800px; }

/* Intro card (green left border) */
.card--intro{ margin-bottom: 30px; border-left: 3px solid var(--green); }
.card--intro .data-label{ color: var(--green); margin-bottom: 16px; display: block; }
.card--intro .data-value{ font-size: 16px; margin-bottom: 20px; }

/* Feature grid (3-col in intro card) */
.feature-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.feature-grid strong{ display: block; }
.feature-grid .muted{ font-size: 13px; margin-top: 4px; }

/* Offer card header & price */
.card-offer-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.card-offer-header h3{ margin: 8px 0 0; }
.card-offer-price{ text-align: right; font-family: var(--font-mono); }
.card-offer-price .value{ font-size: 20px; font-weight: 700; }
.card-offer-price .muted{ font-size: 11px; }

/* Spec table (offer cards, engineering) */
.spec-table{
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.spec-table td{ padding: 12px 0; }
.spec-table tr{ border-bottom: 1px solid var(--border); }
.spec-table tr:last-child td{ border-bottom: none; }
.spec-table .tech-val{ text-align: right; color: var(--amber); }
.spec-table td:last-child{ text-align: right; }

/* Data label (// CODE_STYLE) */
.data-label{
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: var(--text);
}
.tech-highlight{ color: var(--amber); }

/* Button row under cards */
.btn-row{ display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row .btn{ flex: 1; min-width: 140px; }

/* Tag row (data-label + pills) */
.tag-row{ margin-top: 30px; }
.tag-row .data-label{ margin-bottom: 10px; }
.tag-row .pills{ display: flex; flex-wrap: wrap; gap: 8px; }

/* Stack grid (engineering cards) */
.stack-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.stack-item{
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
}
.stack-item-label{
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 4px;
}
.stack-item strong{ font-size: 14px; }

/* Engineering card header & lead */
.card-engineering-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}
.card-engineering-body{
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 16px 0 24px;
  color: var(--text);
  line-height: 1.55;
}

/* Details list (accordion specs) */
.details-list details{ margin-bottom: 10px; }
.details-list details:last-child{ margin-bottom: 0; }
.details-list summary{
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}
.details-list summary::-webkit-details-marker{ opacity: 0.5; }
.details-list .details-content{
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
}
.details-list .details-content ul{ margin: 0 0 0 18px; padding: 0; }
.details-list .details-content li{ margin-bottom: 6px; }

/* CTA card (accent border) */
.card--cta{
  margin-top: 30px;
  border-left: 3px solid #1967d2;
}
.card--cta .card-cta-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.card--cta .card-cta-price{ font-size: 18px; font-weight: 700; color: #1967d2; font-family: var(--font-mono); }
.card--cta .card-cta-actions{ margin-top: 20px; }
.card--cta .btn--outline{ width: 100%; justify-content: center; border-color: #1967d2; color: #1967d2; }

.card--cta.card--cta-amber{ border-left-color: #e37400; }
.card--cta.card--cta-amber .card-cta-price{ color: #e37400; }
.card--cta.card--cta-amber .btn--outline{ border-color: #e37400; color: #e37400; }

/* Section CTA (centered bottom) */
.section-cta{ margin-top: 50px; text-align: center; }
.section-cta .muted{ font-size: 13px; margin-bottom: 16px; }

/* Chat section header (centered) */
.chat-section-head{
  justify-content: center;
  text-align: center;
  margin-bottom: 20px;
}

/* Engineering view card spacing */
.state-engineering > .card:not(.card--cta){ margin-bottom: 30px; }
.state-engineering > .card:last-child{ margin-bottom: 0; }

/* Checkbox grid (tech stack selection) */
.checkbox-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.check-card{ position: relative; }

.check-card input{
  position:absolute;
  opacity:0;
  cursor:pointer;
  height:0;
  width:0;
}

.check-label{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}

.check-label:hover{ border-color: var(--border-strong); color: var(--text); }

.check-card input:checked ~ .check-label{
  background: rgba(25,103,210,0.08);
  border-color: #1967d2;
  color: #1967d2;
  font-weight: 700;
}

.check-card input:checked ~ .check-label .icon{ color:#1967d2; }

/* ==========================================================================
   9) Consent Manager (single definition)
   ========================================================================== */

.consent-shell{
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;

  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);

  z-index: var(--z-consent);
  font-family: var(--font-ui);

  animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: none; /* JS should control visibility */
}

.consent-header{
  padding: 12px 16px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.consent-icon{ color: var(--green); font-size: 16px; }

.consent-label{
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

.consent-body{ padding: 16px; }

.consent-text{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.consent-subtext{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.consent-actions{
  padding: 0 16px 16px;
  display:flex;
  gap: 10px;
}

.consent-btn{
  flex:1;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid transparent;
  background: transparent;
}

.consent-btn.primary{
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.consent-btn.primary:hover{ opacity: .92; }

.consent-btn.ghost{
  border-color: var(--border);
  color: var(--muted);
}
.consent-btn.ghost:hover{
  border-color: var(--border-strong);
  color: var(--text);
}

@keyframes slideInUp{
  from{ transform: translateY(40px); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   10) Responsive Engine
   ========================================================================== */

/* Desktop default */
#burgerBtn, .burger-btn{ display:none; }
.sidebar-close{ display:none; }

/* Tablet */
@media (max-width: 1020px){
  .hero-metrics{
    min-width: 0;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
  }
}

/* Mobile drawer */
@media (max-width: 980px){
  :root{ --topbar-h: 70px; }

  .content{
    padding: 18px 14px calc(140px + env(safe-area-inset-bottom, 0px));
  }

  .offer-grid,
  .form-grid{
    grid-template-columns: 1fr;
  }

  .section-hero{ flex-direction: column; }

  /* Sidebar becomes a glass drawer */
  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 288px;

    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* ULTRA-CLEAN: Gradient instead of solid color */
    background: linear-gradient(
      180deg, 
      var(--bg-elev) 0%, 
      color-mix(in srgb, var(--bg-elev) 90%, transparent) 35%, 
      transparent 100%
    );

    /* Glass effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* Remove heavy borders/shadows for airy feel */
    box-shadow: none;
    border-right: none;
    
    padding-bottom: env(safe-area-inset-bottom, 20px);
    z-index: var(--z-sidebar);
    
    /* Ensure content structure allows for scroll masking */
    display: flex;
    flex-direction: column;
  }

  /* Fade out the scrollable content at the bottom */
  .sidebar .nav-menu {
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  }

  .sidebar.open{ transform: translateX(0); }

  .sidebar-overlay{ 
    z-index: var(--z-overlay);
    /* Lighter overlay to match the clean style */
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
  }

  /* Burger button becomes visible and clickable */
  #burgerBtn, .burger-btn{
    display: inline-flex;
    align-items:center;
    justify-content:center;
    cursor: pointer;
    color: var(--text);

    /* z-index only works with positioning */
    position: relative;
    z-index: calc(var(--z-topbar) + 1);
  }

  .sidebar-close{ display: inline-flex; }

  /* Topbar on mobile: slightly tighter padding */
  .topbar{
  padding-left: 16px;
  padding-right: 16px;
  border-bottom: none;
  background: transparent;
}

/* Mobile fade overlay */
.topbar::before{
  opacity: 1;
  background: linear-gradient(
    to bottom,
    var(--topbar-fade-strong) 0%,
    var(--topbar-fade-mid) 55%,
    var(--topbar-fade-weak) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
}

/* Small mobile */
@media (max-width: 600px){
  .offer-switch{
    width: 100%;
    display:flex;
  }
  .offer-btn{
    flex:1;
    justify-content:center;
    text-align:center;
  }
  .icon-btn{
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px){
  .hero-metrics{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .kpi-label{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

  .kpi-value{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

  .consent-shell{
    bottom: 0;
    right: 0;
    width: 100%;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
  }
}

/* ==========================================================================
   11) Dark mode practical tweaks (no global overrides)
   ========================================================================== */

html[data-theme="dark"] .icon-btn{ color: var(--text); }
html[data-theme="dark"] .nav-item{ color: rgba(255,255,255,0.70); }
html[data-theme="dark"] .nav-item:hover{ color: #fff; }
html[data-theme="dark"] .nav-item.active{ color: var(--text); }
html[data-theme="dark"] .nav-item.active .icon{ color: var(--green); }

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
}

/* ==========================================================================
   MOBILE FULL SCREEN MODE
   ========================================================================== */
@media (max-width: 980px) {

  /* 1. Fullscreen Container */
  #glasbox_chat.view-section {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    margin: 0;
    padding: 0;
    height: 100dvh;
    display: none;
    flex-direction: column;
  }
  
  #glasbox_chat.view-section.active { display: flex; }

  /* 2. Shell */
  .chat-shell {
    flex: 1;
    height: auto;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg);
  }

  /* 3. Output Area */
  .chat-output {
    /* More top padding to push text lower initially */
    padding: 100px 16px 20px 16px; 
  }

  /* 4. Input Area */
  .chat-form {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 20px));
    position: relative;
    z-index: 120;
  }
  
  .chat-input-wrapper { border-radius: 24px; }

  /* 5. Header Visuals */
  .chat-header-wrapper {
    /* Push initial header down significantly for aesthetics */
    padding-top: 12vh; 
    text-align: center;
  }
  
  /* State: Hide Header */
  .chat-mode-active .chat-header-wrapper {
    max-height: 0;
    padding-top: 0;
    opacity: 0;
    margin: 0;
  }
  


  /* Adjust content when header is gone */
  .chat-mode-active .chat-output {
    padding-top: 20px; 
  }

  /* Disclaimer on mobile - ensure it doesn't break layout */
  .chat-disclaimer {
    font-size: 9px;
    margin-top: 8px;
  }

  /* Adjust Logo for Mobile */
  .chat-bg-logo {
    font-size: 100px;
    top: 45%; 
  }
  
  /* Header Fix Logic from previous step (KEEP THIS) */
  body.view-mode-chat .topbar {
    position: absolute;
    width: 100%;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    pointer-events: none;
    z-index: 101;
  }
  
  body.view-mode-chat .topbar button, 
  body.view-mode-chat .topbar a {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
  }
  
  html[data-theme="dark"] body.view-mode-chat .topbar button,
  html[data-theme="dark"] body.view-mode-chat .topbar a {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255,255,255,0.1);
  }


  /* --- 6. General Mobile Adjustments (Existing) --- */
  :root{ --topbar-h: 70px; }

  .content{
    padding: 18px 14px calc(140px + env(safe-area-inset-bottom, 0px));
  }

  .offer-grid, .form-grid{ grid-template-columns: 1fr; }
  .section-hero{ flex-direction: column; }

  /* Sidebar Drawer Logic */
  .sidebar{
    position: fixed;
    top: 0; left: 0;
    height: 100vh; height: 100dvh;
    width: 288px;
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: linear-gradient(180deg, var(--bg-elev) 0%, color-mix(in srgb, var(--bg-elev) 90%, transparent) 35%, transparent 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none; border-right: none;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    z-index: var(--z-sidebar);
    display: flex; flex-direction: column;
  }

  .sidebar .nav-menu {
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
  }

  .sidebar.open{ transform: translateX(0); }

  .sidebar-overlay{ 
    z-index: var(--z-overlay);
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
  }

  #burgerBtn, .burger-btn{
    display: inline-flex;
    position: relative;
    z-index: calc(var(--z-topbar) + 1);
  }

  .sidebar-close{ display: inline-flex; }
  
  /* Default Mobile Topbar (Non-Chat) */
  .topbar{
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ==========================================================================
   10b) Mobile Header — CSS Grid + Gradient Glass (max-width: 768px only)
   Grid forces dead-centre logo; gradient fade replaces broken mask-image.
   ========================================================================== */
@media (max-width: 768px) {

  /* ── 1. Grid surface ──────────────────────────────────────────── */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 64px;
    padding: 0 16px;

    /* Transparent base — gradient creates the visible glass fill */
    background-color: transparent;
    background-image:
      linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.40) 60%,
        rgba(255, 255, 255, 0)    100%
      );

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /* Clean edges — gradient handles the fade, no border needed */
    border-bottom: none;
    box-shadow: none;

    /* Kill mask-image (was hiding the gradient) */
    mask-image: none;
    -webkit-mask-image: none;
  }

  /* Kill the ::before overlay inherited from the ≤980px query */
  .topbar::before {
    display: none;
  }

  /* Kill the scrolled shadow (gradient owns the edge now) */
  .topbar.scrolled {
    box-shadow: none;
  }

  /* ── 2. Left slot — burger + logo ─────────────────────────────── */
  .topbar-left {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 10px;
    position: static;
    transform: none;
  }

  /* ── 3. Right slot — tool icons ───────────────────────────────── */
  .topbar-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
    position: static;
    transform: none;
  }

  /* ── 4. Kill inherited ::after ─────────────────────────────────── */
  .topbar::after {
    content: none;
  }

  /* ── 5. Icon geometry — uniform hit targets ───────────────────── */
  .topbar .icon-btn,
  .topbar #burgerBtn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* ── 7. Chat mode — fully transparent overlay ─────────────────── */
  body.view-mode-chat .topbar {
    background-color: transparent;
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }

  body.view-mode-chat .topbar::after {
    display: none;
  }

  body.view-mode-chat .topbar-logo {
    display: none;
  }

  body.view-mode-chat .topbar-left,
  body.view-mode-chat .topbar-right {
    pointer-events: auto;
  }
}

/* ==========================================================================
   Dashboard content (no inline styles)
   ========================================================================== */

.dash-hero { margin-bottom: 26px; }

.dash-packages { margin-bottom: 18px; }
.dash-packages-head { margin-bottom: 10px; }

.dash-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.dash-sidecard { background: var(--bg-elev-2); }

.dash-list { margin: 8px 0 0; padding-left: 18px; }

.dash-audit { margin-top: 12px; padding: 14px; }
.dash-audit-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.dash-note { margin-top: 12px; padding: 14px; }

.dash-list-header { margin-bottom: 16px; }

.dash-cta-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

.dash-cta-title { margin: 0 0 4px; font-size: 16px; }
.dash-cta-subtitle { margin: 0; font-size: 13px; }

.privacy-card { text-align: center; padding: 40px; }
.privacy-muted { margin-bottom: 20px; }

.privacy-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.chat-send-icon {
  font-size: 18px;
}

/* Ensure interaction layers are correct */
.typing-area,
.msg-ai,
.chat-output {
  pointer-events: auto;
}

/* Consolidated Chat Link Styles */
.chat-output a.chat-link {
  color: var(--green);          /* Branding compliance */
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;   /* Better readability */
  cursor: pointer;
  pointer-events: auto;         /* Force clickable */
  position: relative;           /* Safety for z-index */
  z-index: 5;                   /* Ensure it sits above bubble background */
  transition: opacity 0.2s ease;
}

.chat-output a.chat-link:visited {
  color: var(--green);          /* Don't change color after visit */
}

.chat-output a.chat-link:hover {
  opacity: 0.8;
  text-decoration-color: currentColor;
}

.chat-output a.chat-link:active {
  opacity: 0.6;
  transform: translateY(1px);
}

/* ==========================================================================
   2026 VIEW TRANSITIONS (Native Soft-Nav)
   ========================================================================== */

@view-transition {
  navigation: auto; /* Enable native cross-document transitions if supported */
}


.sidebar {
  view-transition-name: sidebar-area; /* Sidebar stays stable */
}

.main {
  view-transition-name: main-content; /* Content animates */
}

.topbar {
  view-transition-name: topbar-area;
}


::view-transition-old(main-content) {
  animation: fadeOut 0.2s ease-in forwards;
}

::view-transition-new(main-content) {
  animation: slideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  mix-blend-mode: normal;
}


@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-5px); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


::view-transition-old(sidebar-area),
::view-transition-new(sidebar-area),
::view-transition-old(topbar-area),
::view-transition-new(topbar-area) {

  animation: none;
  mix-blend-mode: normal;
}

/* --- FIX: Sliding pill for Code/Enterprise switch (contact only) --- */
.view-switch{
  position: relative;
  isolation: isolate;
  --pill-x: 0px;
  --pill-w: 0px;
}

.view-switch::before{
  content:"";
  position:absolute;
  top:4px;
  left:4px;
  height: calc(100% - 8px);
  width: var(--pill-w);
  transform: translateX(var(--pill-x));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform .22s cubic-bezier(0.2,0.8,0.2,1), width .22s cubic-bezier(0.2,0.8,0.2,1);
  z-index: 0;
}

/* Buttons above the slider */
.view-btn{
  position: relative;
  z-index: 1;
}

/* Active state handled by slider, not by "filled button" */
.view-btn.active{
  background: transparent;
  box-shadow: none;
  border: none;
}

/* SEO micro-dashboard (charts) */
.seo-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}

.seo-charts{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}

@media (max-width: 980px){
  .seo-charts{ grid-template-columns: 1fr; }
}

.seo-chart-card{
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  border-radius: 16px;
  padding: 14px;
}

.seo-chart-title{
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.seo-stage{ min-height: 140px; }

.seo-linechart{
  width:100%;
  height:140px;
  display:block;
}

.seo-grid{
  stroke: var(--border);
  stroke-width: 1;
  fill: none;
  opacity: 0.8;
}

.seo-line{
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: seoDraw 1100ms ease forwards;
}

@keyframes seoDraw{
  to{ stroke-dashoffset: 0; }
}

.seo-bars{
  height:140px;
  display:flex;
  align-items:flex-end;
  gap:8px;
  padding: 6px 2px;
}

.seo-bar{
  width: 10%;
  min-width: 14px;
  height: calc(var(--h) * 1%);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  overflow:hidden;
  transform-origin: bottom;
  animation: seoBar 900ms ease forwards;
}

.seo-bar::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(227,116,0,0.70), rgba(227,116,0,0.10));
}

@keyframes seoBar{
  from{ transform: scaleY(0.10); opacity: 0.6; }
  to{ transform: scaleY(1); opacity: 1; }
}

.seo-legend{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:10px;
}

.seo-charts-head {
  display:flex;
  gap:16px;
  align-items:flex-end;
  justify-content:space-between;
  margin-bottom:16px;
  flex-wrap:wrap;
}

.seo-charts-kpis {
  display:grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap:12px;
}

.seo-kpi {
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background: var(--panel);
}

.seo-charts-grid {
  display:grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap:16px;
}

.seo-chart-meta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.seo-bars-legend {
  display:flex;
  gap:8px;
  align-items:center;
  margin:10px 0 8px;
}

.seo-bars { display:flex; gap:10px; align-items:flex-end; }

.seo-bar-pair { display:flex; gap:6px; align-items:flex-end; }

/* ==========================================================================
   Chat UI (Gemini / ChatGPT Style - Final Visuals)
   ========================================================================== */

/* Wrapper for the transition of the header visibility */
.chat-header-wrapper {
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  /* FIX: Increased padding to push text down initially */
  padding-top: 40px; 
}

/* State class added via JS when user interacts */
.chat-mode-active .chat-header-wrapper {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding-top: 0;
  pointer-events: none;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  flex: 1;                /* fill all available vertical space */
  min-height: 0;          /* flex overflow fix */
  background: var(--bg-surface);
  overflow: hidden;
  position: relative;     /* context for absolute background logo */
  transition: all 0.3s ease;
}

/* --- BACKGROUND LOGO ANIMATION --- */
.chat-bg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 140px;
  color: var(--amber);
  opacity: 0.06; /* Very subtle transparency */
  filter: blur(8px); /* Blurred effect */
  pointer-events: none;
  z-index: 0; /* Behind text */
  transition: all 0.6s ease-out;
}

/* When chat starts, logo fades out and moves up */
.chat-mode-active .chat-bg-logo {
  top: 20%;
  opacity: 0;
  transform: translate(-50%, -80%) scale(0.8);
}

/* Message Area */
.chat-output {
  flex: 1;
  overflow-y: auto;
  padding: 40px 24px 10px; 
  display: flex;
  flex-direction: column;
  gap: 24px; 
  scroll-behavior: smooth;
  transform: translateZ(0);
  position: relative;
  z-index: 2; /* Above the logo */
}

/* User Message */
.msg-user {
  align-self: flex-end;
  background: var(--bg-elev-2);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 20px;
  border-bottom-right-radius: 4px; 
  font-size: 15px;
  line-height: 1.5;
  max-width: 85%;
  border: 1px solid var(--border);
  word-wrap: break-word;
}

/* AI Message */
.msg-ai {
  align-self: flex-start;
  background: transparent;
  color: var(--text);
  padding: 0 4px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
  width: 100%;
}
.msg-ai strong { color: var(--green); font-weight: 600; }
.msg-ai ul { padding-left: 20px; margin: 8px 0; }
.msg-ai li { margin-bottom: 4px; }

/* AI Header (Avatar + Name) */
.ai-header {
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-bottom: 6px; 
  opacity: 0.9;
}

/* Form Area */
.chat-form {
  padding: 10px 24px 20px;
  background: transparent;
  flex-shrink: 0;
  display: flex;
  flex-direction: column; /* Stack input and disclaimer */
  align-items: center;
  position: relative;
  z-index: 20;
}

.chat-input-wrapper {
  width: 100%;
  max-width: 760px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 8px 8px 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.chat-input-wrapper:focus-within {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.08),
    0 0 0 4px rgba(227,116,0,0.16);
}

.chat-input {
  flex: 1;
  border: none !important;      
  background: transparent !important;
  box-shadow: none !important;   
  outline: none !important;     
  padding: 4px 0 !important;
  font-size: 16px; 
  color: var(--text);
  height: auto;
  max-height: 120px;
}


.chat-input:focus::placeholder {
  opacity: 0;
  transition: opacity 0.2s ease; 
}

.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: transform 0.1s;
  flex-shrink: 0;
}

/* --- DISCLAIMER FOOTER --- */
.chat-disclaimer {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  opacity: 0.7;
  max-width: 400px;
}
.chat-disclaimer a {
  text-decoration: underline;
  color: var(--text);
}

.chat-copy-btn {
  margin-top: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.chat-copy-btn:hover { color: var(--text); background: var(--bg-elev-2); }
.chat-copy-btn .material-icons { font-size: 16px; }

.chat-loading{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}

.chat-spinner{
  font-size:18px;
  display:inline-block;
  animation: chatSpin 1s linear infinite;
}

@keyframes chatSpin{
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ==========================================================================
   12) Legal Pages (AGB, Datenschutz, Impressum)
   Extracted from per-page <style> blocks — single source of truth.
   ========================================================================== */

.legal-block{ margin-bottom: 30px; }

.legal-title{
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.legal-text{
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  text-align: justify;
}
.legal-text strong{ color: var(--text); font-weight: 600; }
.legal-text ul{ padding-left: 20px; margin: 8px 0; }
.legal-text li{ margin-bottom: 6px; }

.para-num{
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 700;
  margin-right: 6px;
}

.tech-badge{
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-elev-2);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ==========================================================================
   13) Cookie Table
   ========================================================================== */

.cookie-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.cookie-table th{
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}
.cookie-table td{
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cookie-key{
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
}
.cookie-badge{
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--border);
}
.badge-ess{
  background: rgba(71, 219, 115, 0.1);
  color: var(--green);
  border-color: rgba(71, 219, 115, 0.2);
}
.badge-ana{
  background: rgba(25, 103, 210, 0.1);
  color: #1967d2;
  border-color: rgba(25, 103, 210, 0.2);
}

/* ==========================================================================
   14) FAQ Accordion
   ========================================================================== */

.tech-font{ font-family: var(--font-mono); }

.section-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 30px;
  margin-bottom: 12px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.section-label--blue{ color: #1967d2; }
.section-label--amber{ color: #e37400; }
.section-label--purple{ color: #9c27b0; }

.nav-item.sys-file{
  font-family: var(--font-mono);
  font-size: 13px;
}

details{
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}
details[open]{
  background: var(--bg-elev-2);
  border-color: var(--border-strong);
}

summary{
  padding: 14px 18px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}
summary::-webkit-details-marker{ display: none; }
summary::after{
  content: '+';
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 16px;
  color: var(--muted);
}
details[open] summary::after{ content: '-'; }

.faq-answer{
  padding: 0 18px 18px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.9;
}
.faq-answer ol,
.faq-answer ul{ padding-left: 20px; margin: 8px 0; }
.faq-answer li{ margin-bottom: 4px; }

/* ==========================================================================
   15) Contact Page
   ========================================================================== */

.contact-wrapper{
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 900px){
  .contact-wrapper{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   16) Inline-Style Replacements (Semantic Utility Classes)
   Extracted from per-page style="" attributes — zero visual regressions.
   ========================================================================== */

/* -- Sidebar CTA hash symbol -- */
.sidebar-cta-hash{
  color: var(--amber);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}

/* -- Active nav item emphasis -- */
.nav-icon--active{ color: var(--amber); }
.nav-label--active{ font-weight: 600; color: var(--text); }

/* -- Language switcher states -- */
.seg-btn--current{
  cursor: default;
  font-weight: 800;
  color: var(--text);
}
.seg-btn--link{
  text-decoration: none;
  display: inline-block;
}

/* -- Bordered back-link in legal sidebars -- */
.nav-item--bordered{ border: 1px solid var(--border); }

/* -- Form layout: 2-column row -- */
.form-row-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* -- Page section intro -- */
.section-intro{ margin-bottom: 22px; }
.section-intro-lg{ margin-bottom: 30px; }
.section-intro-badges{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* -- Page headings (large/medium mono-style) -- */
.page-heading-lg{
  font-size: 32px;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.page-heading-md{
  font-size: 28px;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

/* -- Pill variant: dark (emphasis) border -- */
.pill--emphasis{
  border-color: var(--text);
  color: var(--text);
}

/* -- Card variants -- */
.card--padded{ padding: 24px; }
.card--padded-sm{ padding: 20px; }
.card--intake{
  padding: 16px;
  margin-top: 14px;
  background: var(--bg-elev-2);
  border-color: var(--border);
}
.card--muted{
  background: var(--bg-elev-2);
  border-color: var(--border);
}

/* -- Card inline section header -- */
.card-section-header{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.card-section-header strong{ font-size: 13px; }

/* -- Hidden honeypot field -- */
.u-hidden{ display: none; }

/* -- Visually hidden file input (accessible) -- */
.file-input-sr{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -- File upload trigger button -- */
.file-upload-trigger{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  cursor: pointer;
}

/* -- File upload name display -- */
.file-upload-name{
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* -- Attachment row (icon + filename) -- */
.file-upload-row{
  display: flex;
  gap: 10px;
  align-items: center;
}

/* -- Label with left/right split -- */
.label-split{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* -- Text size helpers -- */
.text-hint{ font-size: 12px; }
.text-sm{ font-size: 13px; }

/* -- Consent small text -- */
.consent-sm{
  font-size: 12px;
  color: var(--muted);
}
.consent-sm a{ text-decoration: underline; }

/* -- Contact sidebar column -- */
.contact-sidebar{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* -- Contact info card body -- */
.contact-info-body{
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* -- Contact links column -- */
.contact-links-col{
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.contact-links-col a{ text-decoration: underline; }

/* -- AI CTA card body -- */
.ai-cta-body{
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* -- Centered ghost button -- */
.btn--centered{
  justify-content: center;
  background: var(--bg-elev);
}

/* -- Bottom legal footer links -- */
.contact-footer-links{
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}
.contact-footer-links a{ font-size: 11px; }

/* -- Spacing utilities -- */
.mt-sm{ margin-top: 10px; }
.mt-md{ margin-top: 14px; }
.mt-lg{ margin-top: 18px; }

/* -- Sidebar footer for legal pages (full-width lang switch) -- */
.sidebar-lang--full{
  width: 100%;
  margin-bottom: 16px;
  justify-content: center;
}
.sidebar-lang--full .seg-btn{
  flex: 1;
  text-align: center;
}

/* -- Language visibility overrides (FAQ bilingual pages) -- */
html[data-lang="de"] .lang-en{ display: none !important; }
html[data-lang="en"] .lang-de{ display: none !important; }

/* Price hint in package cards */
.price-hint {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber, #e37400);
  margin: 8px 0 12px 0;
  letter-spacing: 0.01em;
}

/* Form promise / SLA message */
.form-promise {
  font-size: 0.82rem;
  color: var(--green, #2e7d32);
  font-weight: 500;
  margin: 0 0 12px 0;
  opacity: 0.85;
}

/* Trust strip section */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-around;
  padding: 28px 24px;
  margin-bottom: 24px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-width: 120px;
}

.trust-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amber, #e37400);
  letter-spacing: -0.02em;
}

.trust-label {
  font-size: 0.78rem;
  color: var(--muted, #666);
  font-weight: 500;
  line-height: 1.3;
}

/* How we work section */
.how-it-works {
  padding: 32px 28px;
  margin-bottom: 24px;
}

.how-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.how-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--amber, #e37400);
  min-width: 36px;
  line-height: 1;
}

.how-content strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.how-content p {
  font-size: 0.85rem;
  color: var(--muted, #666);
  margin: 0;
  line-height: 1.5;
}

/* Problem section */
.problem-section {
  padding: 32px 28px;
  margin-bottom: 24px;
}

.problem-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .problem-grid {
    grid-template-columns: 1fr;
  }
}

.problem-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.problem-icon {
  font-size: 22px;
  color: var(--amber, #e37400);
  flex-shrink: 0;
  margin-top: 2px;
}

.problem-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.problem-text p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.problem-cta-hint {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amber, #e37400);
  margin: 0;
  text-align: center;
  letter-spacing: -0.01em;
}

/* Dark mode glass topbar */
html[data-theme="dark"] .topbar {
  background: linear-gradient(
    to bottom,
    var(--topbar-fade-strong) 0%,
    var(--topbar-fade-mid) 60%,
    var(--topbar-fade-weak) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  box-shadow: none;
}

/* =============================================
   CREDIBILITY SECTION
   ============================================= */

.credibility-section {
  padding: 32px 28px;
  margin-bottom: 24px;
}

.cred-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .cred-numbers {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cred-numbers {
    grid-template-columns: 1fr 1fr;
  }
}

.cred-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cred-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--amber, #e37400);
  letter-spacing: -0.03em;
  line-height: 1;
}

.cred-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.cred-divider {
  height: 1px;
  background: var(--border);
  margin: 0 0 28px 0;
}

.cred-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .cred-proof {
    grid-template-columns: 1fr;
  }
}

.cred-proof-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cred-icon {
  font-size: 20px;
  color: var(--amber, #e37400);
  flex-shrink: 0;
  margin-top: 2px;
}

.cred-proof-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.cred-proof-item p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.cred-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(227, 116, 0, 0.06);
  border: 1px solid rgba(227, 116, 0, 0.2);
  border-radius: var(--radius-sm);
}

.cred-guarantee .icon {
  font-size: 20px;
  color: var(--amber, #e37400);
  flex-shrink: 0;
  margin-top: 2px;
}

.cred-guarantee p {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

/* =============================================
   BLOG
   ============================================= */

.blog-page-header {
  margin-bottom: 28px;
}

.blog-page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.blog-page-subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.blog-cat-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.blog-cat-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.blog-cat-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative;
}

.blog-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--amber);
}

.blog-card-featured-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  background: var(--amber);
  color: #fff;
  border-radius: 999px;
}

.blog-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
  flex: 1;
}

.blog-card-excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.blog-card-meta {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.blog-card-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amber);
  margin-top: 6px;
}

/* Blog Article */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.blog-article-header {
  margin-bottom: 36px;
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 20px;
}

.blog-back-link:hover { color: var(--amber); }

.blog-article-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 10px;
}

.blog-article-title {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

@media (max-width: 640px) {
  .blog-article-title { font-size: 1.4rem; }
}

.blog-article-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-article-body {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text);
}

.blog-article-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 36px 0 14px;
}

.blog-article-body p { margin: 0 0 18px; }

.blog-lead {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.65;
  border-left: 3px solid var(--amber);
  padding-left: 18px;
  margin-bottom: 24px !important;
}

.blog-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 24px;
}

.blog-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.blog-check-icon {
  font-size: 17px;
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 2px;
}

.blog-check-item p { margin: 0 !important; font-size: 0.9rem; }

.blog-use-cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0 24px;
}

@media (max-width: 600px) {
  .blog-use-cases { grid-template-columns: 1fr; }
}

.blog-use-case {
  padding: 16px 18px;
  background: var(--bg-elev-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.blog-use-case strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 5px;
}

.blog-use-case p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 !important;
  line-height: 1.5;
}

.blog-pricing-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 16px 0 8px;
}

.blog-pricing-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  padding: 11px 14px;
  font-size: 0.83rem;
  border-bottom: 1px solid var(--border);
}

.blog-pricing-row:last-child { border-bottom: none; }

.blog-pricing-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--bg-elev-2);
}

.blog-pricing-highlight {
  background: rgba(227,116,0,0.05);
  font-weight: 600;
}

@media (max-width: 520px) {
  .blog-pricing-row { grid-template-columns: 1fr; gap: 3px; }
  .blog-pricing-header { display: none; }
}

.blog-list {
  padding-left: 20px;
  margin: 14px 0 22px;
}

.blog-list li {
  font-size: 0.9rem;
  margin-bottom: 7px;
  line-height: 1.6;
}

.blog-cta-box {
  margin: 36px 0 20px;
  padding: 28px 24px;
  background: rgba(227,116,0,0.06);
  border: 1px solid rgba(227,116,0,0.22);
  border-radius: var(--radius);
  text-align: center;
}

.blog-cta-box h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.blog-cta-box p {
  color: var(--muted);
  font-size: 0.87rem;
  margin-bottom: 18px !important;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog internal link block */
.blog-internallink {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  margin: 20px 0 24px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
}

.blog-internallink-anchor {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
}

.blog-internallink-anchor:hover {
  text-decoration: underline;
}

/* Blog image */
.blog-figure {
  margin: 24px 0 28px;
}

.blog-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.blog-caption {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* ==========================================================================
   Desktop topbar final override (light)
   - stronger white gradient
   - explicit fade tail into content
   - no shadow / no hard separation
   ========================================================================== */
@media (min-width: 769px) {
  html[data-theme="light"] .topbar {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.98) 40%,
      rgba(255, 255, 255, 0.82) 72%,
      rgba(255, 255, 255, 0) 100%
    ) !important;
    border-bottom: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible;
  }

  html[data-theme="light"] .topbar::before {
    display: none !important;
  }

  html[data-theme="light"] .topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -34px;
    height: 34px;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  html[data-theme="light"] .topbar.scrolled {
    box-shadow: none !important;
  }
}

/* ==========================================================================
   TECH TRUST BAR (Logo Cloud) - FIXED
   ========================================================================== */
   .tech-trust-section {
    margin-top: 40px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  
  .tech-trust-label {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
  }
  
  .tech-trust-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px 50px;
    max-width: 900px;
    margin: 0 auto;
  }
  
  .tech-trust-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    color: var(--text); /* Klonowanie koloru dla tekstu */
    text-decoration: none;
    filter: grayscale(100%) opacity(0.5);
    transition: filter 0.3s ease, transform 0.3s ease;
    cursor: pointer;
  }
  
  .tech-trust-logo svg {
    height: 24px; /* Zablokowanie wysokości ikony */
    width: auto;
    display: block;
  }
  
  .tech-trust-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: translateY(-2px);
  }
  
  @media (max-width: 768px) {
    .tech-trust-grid { gap: 20px 30px; }
    .tech-trust-logo { height: 28px; }
    .tech-trust-logo svg { height: 20px; }
    .tech-trust-logo span { font-size: 16px !important; }
  }