/* ==========================================================================
   Dream AI (Dream Machines) — landing component for dreammachines.pl
   Every rule is scoped to .dream-ai and every class / id / animation name starts with dai-,
   so the landing and the DM page cannot change each other's look.
   Color System (3-Color Discipline):
   - Surface / Base: #FFFFFF (Pure White) & #F8FAFC (Soft Slate Tint)
   - Ink / Structure: #0F172A (Deep Slate) & #334155 (Body Copy)
   - Brand Accent: #E30613 (Dream Machines Red, Hover: #C40510)
   ========================================================================== */

/* Montserrat — the same typeface as dreammachines.pl — served from this site (no request to Google).
   Variable font, SIL Open Font License — see assets/fonts/OFL-Montserrat.txt */
@font-face {
  font-family: 'Dream AI Montserrat';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../assets/fonts/montserrat-latin-ext.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: 'Dream AI Montserrat';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../assets/fonts/montserrat-latin.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;
}

.dream-ai {
  --bg-white: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --brand-red: #e30613;
  --brand-red-hover: #c40510;
  --brand-red-soft: rgba(227, 6, 19, 0.08);
  --brand-red-text: #e30613;   /* red used as text or icon; lighter in dark mode for contrast */

  /* Fill of selected controls (configurator answers, tabs, configuration picker) and the text on it */
  --ink: #0f172a;
  --on-ink: #ffffff;
  --on-ink-muted: #cbd5e1;

  /* Messages and surfaces that change with the theme */
  --success-text: #065f46;
  --success-border: #a7f3d0;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;
  --glass: rgba(255, 255, 255, 0.92);
  --hero-dots: #cbd5e1;
  --photo-plate: #f8fafc;
  --chart-cloud: #e30613;  /* product photos have a light background baked in, so their frame stays light */

  --status-green: #047857;
  --status-green-soft: #ecfdf5;

  --font-heading: 'Montserrat', 'Dream AI Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Montserrat', 'Dream AI Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Near-square corners like dreammachines.pl (its buttons use 2 px, its tiles 0 px) */
  --radius-sm: 2px;
  --radius-md: 2px;
  --radius-lg: 4px;
  --radius-xl: 6px;
  --radius-pill: 999px;

  /* Shared with dreammachines.pl */
  --dm-bar: #222222;
  --dm-black: #000000;
  --dm-muted: #777777;
  /* Wysokość przyklejonego nagłówka strony DM nad komponentem (58px na dreammachines.pl); pasek sekcji
     przykleja się tuż pod nim. Ustawiana w atrybucie style komponentu (style="--header-h: 58px"). */
  --header-h: 58px;
  --bar-h: 95px; /* section bar: 80 px, up to 95 px when a label wraps */

  /* Type scale (px at 16px root): 12 · 13 · 14 · 15 · 16 · 18 · 20 · 24, plus the two fluid heading sizes */
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.1);
}

/* Shield from the DM page: every element inside the component starts from the browser's defaults, so
   general rules of the DM page (h1 { text-transform: … }, img { … }, button { … }) don't reach it.
   Low specificity on purpose — the component's own rules below override it. SVG is left out, because
   resetting would drop the icons' fill / stroke attributes. */
.dream-ai :where(*:not(svg, svg *)) {
  all: revert;
}

/* …except what HTML attributes used to do (the reset drops them in Chrome): hidden elements stay hidden */
.dream-ai :where([hidden]:not([hidden="until-found"])) {
  display: none;
}

/* The DM page wraps everything in .header_page_container with overflow-x: hidden, which turns it into a scroll
   container that never scrolls — and then the sticky section bar never sticks. `clip` cuts off the same overflow
   without that side effect. Only on the page that holds this component. */
.header_page_container:has(.dream-ai) {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

/* The DM page sets `button:focus { background-color: white !important }`, which turns a clicked button white
   (a white icon on white disappears). So every button background in this file is !important as well. */

.dream-ai,
.dream-ai *,
.dream-ai *::before,
.dream-ai *::after {
  box-sizing: border-box;
}

/* Component root: everything the page body used to set, so the DM page's own styles don't shape the landing */
.dream-ai {
  position: relative;
  isolation: isolate; /* the landing's z-indexes (sticky section bar) stay inside it, under the DM header */
  overflow-x: clip;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: 1.65;
  font-style: normal;
  letter-spacing: normal;
  word-spacing: normal;
  text-align: left;
  text-indent: 0;
  text-transform: none;
  text-shadow: none;
  white-space: normal;
  color: var(--text-secondary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

/* Sections land right under the sticky DM header and section bar when reached from the section bar */
.dream-ai section[id] {
  scroll-margin-top: calc(var(--header-h) + var(--bar-h));
}

/* Form controls take the landing's font, not the DM page's */
.dream-ai :where(button, input, select, textarea) {
  font-family: inherit;
}

.dream-ai h1,
.dream-ai h2,
.dream-ai h3,
.dream-ai h4 {
  margin: 0;
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dream-ai p {
  margin: 0;
}

.dream-ai a {
  color: inherit;
  text-decoration: none;
}

.dream-ai :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

.dream-ai img,
.dream-ai svg {
  display: block;
  max-width: 100%;
}

/* Container & Layout Rhythm */
.dream-ai .dai-container {
  width: 90%;
  max-width: 1640px;
  margin: 0 auto;
}

.dream-ai .dai-section {
  padding: 88px 0;
}

.dream-ai .dai-section--subtle {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.dream-ai .dai-section-header {
  max-width: 680px;
  margin-bottom: 48px;
}

.dream-ai .dai-section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.dream-ai .dai-section-title {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
}

.dream-ai .dai-section-lead {
  font-size: var(--fs-18);
  color: var(--text-secondary);
  max-width: 62ch;
}

.dream-ai .dai-section-header--center .dai-section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* Buttons (Minimum 48px height for comfortable touch & desktop UX) */
.dream-ai .dai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: var(--fs-15);
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.dream-ai .dai-btn:active {
  transform: translateY(1px);
}

.dream-ai .dai-btn--primary {
  background-color: var(--brand-red) !important;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(227, 6, 19, 0.22);
}

.dream-ai .dai-btn--primary:hover {
  background-color: var(--brand-red-hover) !important;
  box-shadow: 0 6px 20px rgba(227, 6, 19, 0.28);
}

.dream-ai .dai-btn--secondary {
  background-color: var(--bg-white) !important;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.dream-ai .dai-btn--secondary:hover {
  background-color: var(--bg-subtle) !important;
  border-color: var(--ink);
}

.dream-ai .dai-btn--sm {
  min-height: 42px;
  padding: 9px 18px;
  font-size: var(--fs-14);
}

.dream-ai .dai-btn--full {
  width: 100%;
}

/* ==========================================================================
   Section bar — like the mouse-model bar on dreammachines.pl:
   black, full width, 1 px white line below, sticky under the 58 px header;
   items 118×79 px in one centred row (icon area 50 px, label 10 px / 500, white).
   Phone and tablet (< 1025 px): a sideways carousel, items 84 px wide, white arrows at the edges.
   No active or hover state, as on DM. The theme switch sits at the right end of the bar.
   ========================================================================== */
.dream-ai .dai-section-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); /* tiles centred on the page, switches on the right */
  align-items: center;
  column-gap: 16px;
  background-color: var(--dm-black);
  border-bottom: 1px solid #ffffff;
  padding: 0 5%;
}

.dream-ai .dai-section-bar__nav {
  grid-column: 2;
  position: relative; /* the carousel arrows sit at the edges of the tiles, not over the switches */
  min-width: 0;
}

.dream-ai .dai-section-bar__tools {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Too narrow for centred tiles plus switches: the tiles take the left part (scrolling when needed) */
@media (max-width: 1199px) {
  .dream-ai .dai-section-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dream-ai .dai-section-bar__nav {
    grid-column: 1;
  }

  .dream-ai .dai-section-bar__tools {
    grid-column: 2;
  }
}

.dream-ai .dai-section-bar__track {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.dream-ai .dai-section-bar__track::-webkit-scrollbar {
  display: none;
}

.dream-ai .dai-section-bar__row {
  display: flex;
  justify-content: center;
  width: max-content;
  min-width: 100%;
  margin: 0 auto;
}

.dream-ai .dai-section-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 118px;
  width: 118px;
  min-height: 79px;
  padding: 5px 4px;
  scroll-snap-align: start;
  color: #ffffff;
  text-align: center;
}

.dream-ai .dai-section-bar__icon {
  height: 50px;
  width: auto;
  padding: 8px 0;
  flex-shrink: 0;
}

.dream-ai .dai-section-bar__label {
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  line-height: 14.3px;
  color: #ffffff;
}

.dream-ai .dai-section-bar__arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 35px;
  padding: 0;
  border: 0;
  background: transparent !important;
  color: #ffffff;
  cursor: pointer;
  transform: translateY(-50%);
}

.dream-ai .dai-section-bar__arrow[hidden] {
  display: none;
}

.dream-ai .dai-section-bar__arrow--prev {
  left: 0;
}

.dream-ai .dai-section-bar__arrow--next {
  right: 0;
}

@media (max-width: 1024px) {
  .dream-ai .dai-section-bar {
    padding: 0 25px;
    column-gap: 10px;
  }

  .dream-ai .dai-section-bar__item {
    flex-basis: 84px;
    width: 84px;
  }
}


/* ==========================================================================
   Hero Section
   ========================================================================== */
.dream-ai .dai-hero {
  position: relative;
  padding: 72px 0 84px;
  background-color: var(--bg-white);
  /* Techniczna siatka punktów (blueprint) */
  background-image:
    radial-gradient(var(--hero-dots) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0%, var(--bg-subtle) 100%);
  background-size: 24px 24px, 100% 100%;
  border-bottom: 1px solid var(--border-light);
}

.dream-ai .dai-hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 48px;
}

/* Pozwala kolumnom siatki zwężać się poniżej szerokości długich tekstów (np. paska logu) */
.dream-ai .dai-hero-grid > * {
  min-width: 0;
}

.dream-ai .dai-hero-title {
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.dream-ai .dai-hero-subtitle {
  font-size: var(--fs-18);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 32px;
}

.dream-ai .dai-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.dream-ai .dai-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dream-ai .dai-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.dream-ai .dai-trust-pill--sm {
  padding: 3px 10px;
  font-size: var(--fs-12);
}

.dream-ai .dai-trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-green);
  animation: dai-nodePulse 2.2s infinite;
}

/* Pulsowanie aktywnego węzła lokalnego */
@keyframes dai-nodePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.55);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(5, 150, 105, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
  }
}

/* Hero Visual & Telemetry Console */
.dream-ai .dai-hero-visual {
  position: relative;
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  perspective: 1100px;
  transition: box-shadow 0.25s ease;
}

.dream-ai .dai-hero-visual:hover {
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.14);
}

/* Scena sprzętowa z efektem 3D (pochylenie ustawia js/dream-ai.js) */
.dream-ai .dai-hero-stage {
  position: relative;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 45%, #ffffff 45%, var(--photo-plate) 100%);
  padding: 44px 14px 40px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out;
}

.dream-ai .dai-hero-stage__img {
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 781; /* keeps its space before it loads */
  border-radius: var(--radius-md);
  mix-blend-mode: multiply;
  transition: transform 0.35s ease;
}

.dream-ai .dai-hero-visual:hover .dai-hero-stage__img {
  transform: scale(1.025);
}

/* Pływające etykiety HUD */
.dream-ai .dai-hud-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  font-family: var(--font-heading);
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-primary);
}

.dream-ai .dai-hud-badge--top {
  top: 12px;
  left: 12px;
}

.dream-ai .dai-hud-badge--bottom {
  bottom: 12px;
  right: 12px;
  font-family: var(--font-body);
  font-weight: 600;
}

.dream-ai .dai-hud-badge__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-red);
}

/* Pasek zajętości pamięci GPU */
.dream-ai .dai-vram-meter {
  margin-top: 12px;
  padding: 10px 12px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.dream-ai .dai-vram-meter__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-12);
  color: var(--text-muted);
  margin-bottom: 6px;
}

.dream-ai .dai-vram-meter__header strong {
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.dream-ai .dai-vram-meter__track {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-muted);
  overflow: hidden;
}

.dream-ai .dai-vram-meter__fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--ink) 0%, var(--brand-red) 100%);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dolny pasek logu */
.dream-ai .dai-telemetry-log {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--fs-12);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dream-ai .dai-telemetry-log__prompt {
  color: var(--brand-red-text);
  font-weight: 800;
}

.dream-ai .dai-telemetry-log__text {
  min-width: 0;
  line-height: 1.5;
}

.dream-ai .dai-telemetry-note {
  margin-top: 8px;
  font-size: var(--fs-12);
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .dream-ai .dai-trust-dot {
    animation: none;
  }

  .dream-ai .dai-hero-stage,
.dream-ai .dai-hero-stage__img,
.dream-ai .dai-vram-meter__fill,
.dream-ai .dai-hero-visual:hover .dai-hero-stage__img {
    transition: none;
    transform: none;
  }
}

.dream-ai .dai-telemetry-card {
  margin-top: 16px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.dream-ai .dai-telemetry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dream-ai .dai-telemetry-label {
  font-family: var(--font-heading);
  font-size: var(--fs-12);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.dream-ai .dai-telemetry-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.dream-ai .dai-telemetry-tab {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: var(--bg-white) !important;
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.dream-ai .dai-telemetry-tab.dai-is-active {
  background-color: var(--ink) !important;
  border-color: var(--ink);
  color: var(--on-ink);
}

.dream-ai .dai-telemetry-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dream-ai .dai-telemetry-metrics .dai-metric-box:first-child {
  grid-column: 1 / -1;
}

.dream-ai .dai-metric-box {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.dream-ai .dai-metric-box__name {
  display: block;
  font-size: var(--fs-12);
  color: var(--text-muted);
  margin-bottom: 2px;
}

.dream-ai .dai-metric-box__val {
  font-family: var(--font-heading);
  font-size: var(--fs-15);
  font-weight: 700;
  color: var(--text-primary);
}

.dream-ai .dai-metric-box__val--green {
  color: var(--status-green);
}

/* ==========================================================================
   Shared Card Primitives
   ========================================================================== */
.dream-ai .dai-card-title {
  font-size: var(--fs-18);
  font-weight: 700;
  margin-bottom: 10px;
}

.dream-ai .dai-card-text {
  font-size: var(--fs-15);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Korzyści — benefits drawn inside the company network perimeter
   ========================================================================== */
.dream-ai .dai-perimeter {
  position: relative;
  margin-right: 184px;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 20px 12px 12px;
}

.dream-ai .dai-perimeter__label {
  position: absolute;
  top: -0.85em;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background-color: var(--bg-white);
  font-family: var(--font-heading);
  font-size: var(--fs-15);
  font-weight: 700;
  color: var(--text-primary);
}

.dream-ai .dai-perimeter__label svg {
  color: var(--brand-red-text);
}

/* Severed link from the perimeter to the public cloud */
.dream-ai .dai-perimeter__exit {
  position: absolute;
  top: 50%;
  left: 100%;
  width: 184px;
  display: flex;
  align-items: center;
  transform: translateY(-50%);
}

.dream-ai .dai-perimeter__wire {
  position: relative;
  flex: 1;
  border-top: 2px dashed var(--border-medium);
}

.dream-ai .dai-perimeter__cut {
  position: absolute;
  top: 50%;
  left: 40px;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
}

.dream-ai .dai-perimeter__cut::before,
.dream-ai .dai-perimeter__cut::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: var(--radius-sm);
  background-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--bg-white);
}

.dream-ai .dai-perimeter__cut::before { transform: translateY(-50%) rotate(45deg); }
.dream-ai .dai-perimeter__cut::after { transform: translateY(-50%) rotate(-45deg); }

.dream-ai .dai-perimeter__cloud {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 112px;
  margin-left: 10px;
  color: var(--text-muted);
  font-size: var(--fs-13);
  line-height: 1.3;
  text-align: center;
}

.dream-ai .dai-perimeter__cloud strong {
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: var(--fs-24);
  font-weight: 800;
  color: var(--brand-red-text);
  font-variant-numeric: tabular-nums;
}

.dream-ai .dai-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.dream-ai .dai-benefit {
  display: flex;
  flex-direction: column;
  padding: 32px 32px 28px;
}

.dream-ai .dai-benefit:nth-child(odd) {
  border-right: 1px solid var(--border-light);
}

.dream-ai .dai-benefit:nth-child(-n + 2) {
  border-bottom: 1px solid var(--border-light);
}

.dream-ai .dai-benefit__icon {
  color: var(--brand-red-text);
  margin-bottom: 18px;
}

.dream-ai .dai-benefit__title {
  font-size: var(--fs-20);
  font-weight: 800;
  margin-bottom: 10px;
}

.dream-ai .dai-benefit__text {
  max-width: 48ch;
  font-size: var(--fs-15);
  line-height: 1.65;
}

.dream-ai .dai-benefit__readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-medium);
  font-size: var(--fs-14);
  color: var(--text-muted);
}

.dream-ai .dai-benefit__text {
  margin-bottom: 22px;
}

.dream-ai .dai-benefit__readout strong {
  font-family: var(--font-heading);
  font-size: var(--fs-16);
  font-weight: 800;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Zastosowania — three workloads + hardware ranges
   ========================================================================== */
.dream-ai .dai-workloads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(5, auto) 1fr;
  border-top: 2px solid var(--ink);
}

.dream-ai .dai-workload {
  display: grid;
  grid-row: span 6;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: 32px 32px 0;
}

.dream-ai .dai-workload:first-child {
  padding-left: 0;
}

.dream-ai .dai-workload:last-child {
  padding-right: 0;
}

.dream-ai .dai-workload + .dai-workload {
  border-left: 1px solid var(--border-medium);
}

.dream-ai .dai-workload__icon {
  color: var(--brand-red-text);
  margin-bottom: 18px;
}

.dream-ai .dai-workload__title {
  font-size: var(--fs-24);
  font-weight: 800;
  margin-bottom: 12px;
}

.dream-ai .dai-workload__text {
  max-width: 62ch;
  font-size: var(--fs-15);
  line-height: 1.65;
  margin-bottom: 24px;
}

.dream-ai .dai-workload__facts {
  display: contents;
}

.dream-ai .dai-workload__facts div {
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
}

.dream-ai .dai-workload__facts dt {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-muted);
}

.dream-ai .dai-workload__facts dd {
  margin: 2px 0 0;
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--text-primary);
}

.dream-ai .dai-build-spec {
  margin-top: 64px;
}

.dream-ai .dai-build-spec__title {
  font-size: var(--fs-20);
  margin-bottom: 16px;
}

.dream-ai .dai-build-spec__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  background-color: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dream-ai .dai-build-spec__cell {
  padding: 24px;
  background-color: var(--bg-white);
}

.dream-ai .dai-build-spec__cell dt {
  font-family: var(--font-heading);
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--brand-red-text);
}

.dream-ai .dai-build-spec__range {
  margin: 6px 0 8px;
  font-family: var(--font-heading);
  font-size: var(--fs-20);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.dream-ai .dai-build-spec__note {
  margin: 0;
  font-size: var(--fs-14);
  line-height: 1.55;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .dream-ai .dai-perimeter {
    margin-right: 0;
    margin-bottom: 168px;
  }

  .dream-ai .dai-perimeter__exit {
    top: 100%;
    left: 50%;
    width: auto;
    flex-direction: column;
    transform: translateX(-50%);
  }

  .dream-ai .dai-perimeter__wire {
    flex: none;
    height: 56px;
    border-top: 0;
    border-left: 2px dashed var(--border-medium);
  }

  .dream-ai .dai-perimeter__cut {
    top: 28px;
    left: 0;
  }

  .dream-ai .dai-perimeter__cloud {
    width: auto;
    margin: 8px 0 0;
  }

  .dream-ai .dai-workloads {
    grid-template-columns: 1fr;
  }

  .dream-ai .dai-workload,
.dream-ai .dai-workload:first-child,
.dream-ai .dai-workload:last-child {
    padding: 32px 0;
  }

  .dream-ai .dai-workload + .dai-workload {
    border-left: 0;
    border-top: 1px solid var(--border-medium);
  }

  .dream-ai .dai-workloads {
    grid-template-rows: none;
  }

  .dream-ai .dai-workload {
    display: flex;
    flex-direction: column;
  }

  .dream-ai .dai-workload__facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 24px;
  }

  .dream-ai .dai-build-spec__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dream-ai .dai-perimeter {
    padding: 16px 4px 4px;
  }

  .dream-ai .dai-perimeter__label {
    left: 16px;
  }

  .dream-ai .dai-benefits {
    grid-template-columns: 1fr;
  }

  .dream-ai .dai-benefit {
    padding: 28px 20px 24px;
  }

  .dream-ai .dai-benefit:nth-child(odd) {
    border-right: 0;
  }

  .dream-ai .dai-benefit:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
  }

  .dream-ai .dai-workload__facts {
    display: block;
  }

  .dream-ai .dai-build-spec__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Product Catalog (Dream Lite / Dream Pro / Dream Max — no prices)
   ========================================================================== */
.dream-ai .dai-models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dream-ai .dai-model-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dream-ai .dai-model-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.dream-ai .dai-model-card__series {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--fs-12);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-red-text);
  margin-bottom: 6px;
}

.dream-ai .dai-model-card__sku {
  font-size: var(--fs-20);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.dream-ai .dai-model-card__desc {
  min-height: 4.8em; /* three lines, so switching configurations doesn't make the card jump */
  font-size: var(--fs-15);
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Configuration picker inside a series card */
.dream-ai .dai-variant-picker {
  margin: 4px 0 20px;
}

.dream-ai .dai-variant-picker__label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-muted);
}

.dream-ai .dai-variant-picker__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dream-ai .dai-variant-option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background-color: var(--bg-white) !important;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dream-ai .dai-variant-option:hover {
  border-color: var(--ink);
}

.dream-ai .dai-variant-option__gpu {
  font-family: var(--font-heading);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

.dream-ai .dai-variant-option__mem {
  white-space: nowrap;
  font-size: var(--fs-13);
  line-height: 1.3;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dream-ai .dai-variant-option[aria-pressed="true"] {
  border-color: var(--ink);
  background-color: var(--ink) !important;
}

.dream-ai .dai-variant-option[aria-pressed="true"] .dai-variant-option__gpu {
  color: var(--on-ink);
}

.dream-ai .dai-variant-option[aria-pressed="true"] .dai-variant-option__mem {
  color: var(--on-ink-muted);
}

/* Spec values that changed after picking another configuration */
.dream-ai .dai-is-changed {
  animation: dai-spec-changed 1.2s ease-out;
  border-radius: var(--radius-sm);
}

@keyframes dai-spec-changed {
  0%, 25% { background-color: var(--brand-red-soft); box-shadow: 0 0 0 4px var(--brand-red-soft); }
  100% { background-color: transparent; box-shadow: 0 0 0 4px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .dream-ai .dai-is-changed {
    animation: none;
  }
}

.dream-ai .dai-result-series {
  margin: -8px 0 20px;
  font-size: var(--fs-14);
}

.dream-ai .dai-spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-top: 1px solid var(--border-light);
}

.dream-ai .dai-spec-list li {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--fs-15);
}

.dream-ai .dai-spec-list__label {
  font-size: var(--fs-12);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.dream-ai .dai-spec-list__value {
  font-weight: 600;
  color: var(--text-primary);
}

.dream-ai .dai-model-card__footer {
  margin-top: auto;
}

.dream-ai .dai-model-card__b2b-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--status-green);
  margin-bottom: 14px;
}

/* ==========================================================================
   Interactive Configurator
   ========================================================================== */
.dream-ai .dai-config-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
}

.dream-ai .dai-config-panel {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.dream-ai .dai-config-group {
  margin-bottom: 26px;
}

.dream-ai .dai-config-group:last-child {
  margin-bottom: 0;
}

.dream-ai .dai-config-label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-15);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.dream-ai .dai-option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dream-ai .dai-option-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.dream-ai .dai-option-btn {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background-color: var(--bg-white) !important;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.dream-ai .dai-option-btn:hover {
  border-color: var(--ink);
}

.dream-ai .dai-option-btn.dai-is-selected {
  border-color: var(--ink);
  background-color: var(--ink) !important;
  color: var(--on-ink);
}

.dream-ai .dai-result-card {
  background-color: var(--bg-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.dream-ai .dai-result-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--status-green-soft);
  color: var(--status-green);
  font-size: var(--fs-13);
  font-weight: 700;
  margin-bottom: 14px;
}

.dream-ai .dai-result-sku {
  font-size: var(--fs-24);
  font-weight: 800;
  margin-bottom: 8px;
}

.dream-ai .dai-result-summary {
  font-size: var(--fs-15);
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.dream-ai .dai-result-specs {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 22px;
  display: grid;
  gap: 8px;
  font-size: var(--fs-15);
}

/* ==========================================================================
   Support & Lead Form
   ========================================================================== */
.dream-ai .dai-contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.dream-ai .dai-support-list {
  margin-top: 32px;
  border-top: 2px solid var(--ink);
}

.dream-ai .dai-support-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
}

.dream-ai .dai-support-item__icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--brand-red-text);
}

.dream-ai .dai-support-item__title {
  font-size: var(--fs-18);
  font-weight: 700;
  margin-bottom: 4px;
}

.dream-ai .dai-support-item__text {
  font-size: var(--fs-15);
  line-height: 1.6;
  color: var(--text-secondary);
}

.dream-ai .dai-form-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.dream-ai .dai-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.dream-ai .dai-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dream-ai .dai-form-field--full {
  grid-column: 1 / -1;
}

.dream-ai .dai-form-field label {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-primary);
}

.dream-ai .dai-form-field input,
.dream-ai .dai-form-field select,
.dream-ai .dai-form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background-color: var(--bg-white);
  font-family: var(--font-body);
  font-size: var(--fs-15);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dream-ai .dai-form-field textarea {
  min-height: 96px;
  resize: vertical;
}

.dream-ai .dai-form-field input:focus,
.dream-ai .dai-form-field select:focus,
.dream-ai .dai-form-field textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--brand-red-soft);
}

.dream-ai .dai-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-14);
  color: var(--text-secondary);
  cursor: pointer;
}

.dream-ai .dai-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 3px;
  accent-color: var(--brand-red);
}

.dream-ai .dai-form-success {
  display: none;
  padding: 28px;
  border-radius: var(--radius-lg);
  background-color: var(--status-green-soft);
  border: 1px solid var(--success-border);
}

.dream-ai .dai-form-success.dai-is-visible {
  display: block;
}

.dream-ai .dai-form-success__title {
  font-size: var(--fs-20);
  font-weight: 700;
  color: var(--success-text);
}

.dream-ai .dai-form-success__text {
  margin-top: 6px;
  font-size: var(--fs-15);
  color: var(--success-text);
}

.dream-ai .dai-form-success__text--next {
  margin: 0 0 18px;
}

.dream-ai .dai-form-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dream-ai .dai-form-card__title {
  font-size: var(--fs-24);
  font-weight: 800;
  margin-bottom: 6px;
}

.dream-ai .dai-form-card__lead {
  font-size: var(--fs-15);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.dream-ai .dai-ref-code {
  display: inline-block;
  margin: 10px 0 14px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-white);
  border: 1px solid var(--success-border);
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   Tiers, Tables, Software Stack
   ========================================================================== */
.dream-ai .dai-model-card--featured {
  position: relative;
  border: 2px solid var(--brand-red);
  box-shadow: var(--shadow-md);
}

.dream-ai .dai-model-card__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
}

.dream-ai .dai-tier-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-red);
  color: #ffffff;
  font-size: var(--fs-12);
  font-weight: 700;
}

.dream-ai .dai-tier-for {
  margin-bottom: 20px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-primary);
}

.dream-ai .dai-tier-price {
  margin-bottom: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
}

.dream-ai .dai-usecase-block,
.dream-ai .dai-stack-block {
  margin-top: 48px;
}

.dream-ai .dai-usecase-title {
  font-size: var(--fs-20);
  margin-bottom: 16px;
}

.dream-ai .dai-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background-color: var(--bg-white);
}

.dream-ai .dai-data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: var(--fs-15);
}

.dream-ai .dai-data-table th,
.dream-ai .dai-data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.dream-ai .dai-data-table thead th {
  background-color: var(--bg-subtle);
  font-size: var(--fs-13);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.dream-ai .dai-data-table tbody tr:last-child th,
.dream-ai .dai-data-table tbody tr:last-child td {
  border-bottom: none;
}

.dream-ai .dai-data-table tbody th {
  font-weight: 600;
  color: var(--text-primary);
}

.dream-ai .dai-data-table--compare td {
  text-align: center;
  font-weight: 600;
}

.dream-ai .dai-data-table--compare thead th:nth-child(2),
.dream-ai .dai-data-table--compare td:nth-child(2) {
  background-color: var(--brand-red-soft);
}

/* Highlighted column header: darker text so it stays readable on the tinted background */
.dream-ai .dai-data-table--compare thead th:nth-child(2) {
  color: var(--text-primary);
}

.dream-ai .dai-data-table .dai-yes {
  color: var(--status-green);
}

.dream-ai .dai-data-table .dai-no {
  color: var(--text-muted);
}

.dream-ai .dai-tier-link,
.dream-ai .dai-inline-link {
  color: var(--brand-red-text);
  font-weight: 600;
  text-decoration: underline;
}

.dream-ai .dai-stack-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dream-ai .dai-stack-list li {
  padding: 8px 14px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-pill);
  background-color: var(--bg-white);
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-primary);
}

.dream-ai .dai-result-why {
  margin-bottom: 20px;
  font-size: var(--fs-14);
  color: var(--text-secondary);
}

.dream-ai .dai-next-steps {
  margin: 0 0 24px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: var(--fs-15);
  color: var(--text-secondary);
}

.dream-ai .dai-form-error {
  margin-top: 10px;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--brand-red-text);
}

.dream-ai .dai-demo-note {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background-color: var(--warn-bg);
  border: 1px solid var(--warn-border);
  font-size: var(--fs-14);
  color: var(--warn-text);
}

/* ==========================================================================
   Responsive Breakpoints (Mobile-First Clarity)
   ========================================================================== */
@media (max-width: 1024px) {
  .dream-ai .dai-hero-grid,
.dream-ai .dai-config-layout,
.dream-ai .dai-contact-layout {
    grid-template-columns: 1fr;
  }

  .dream-ai .dai-models-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .dream-ai .dai-section {
    padding: 64px 0;
  }

  .dream-ai .dai-models-grid,
.dream-ai .dai-form-grid,
.dream-ai .dai-option-grid,
.dream-ai .dai-option-grid--3,
.dream-ai .dai-telemetry-metrics {
    grid-template-columns: 1fr;
  }

  .dream-ai .dai-form-card,
.dream-ai .dai-config-panel,
.dream-ai .dai-result-card {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  /* Phone: the photo with its two badges is enough; the console pushes the page down */
  .dream-ai .dai-telemetry-card {
    display: none;
  }

  /* Comparison table: each row becomes a small card, every answer labelled with its column */
  .dream-ai .dai-data-table--compare {
    min-width: 0;
  }

  .dream-ai .dai-data-table--compare thead {
    display: none;
  }

  .dream-ai .dai-data-table--compare tr {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
  }

  .dream-ai .dai-data-table--compare tbody tr:last-child {
    border-bottom: 0;
  }

  .dream-ai .dai-data-table--compare th,
.dream-ai .dai-data-table--compare td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 0;
    border-bottom: 0;
    text-align: left;
  }

  .dream-ai .dai-data-table--compare th[scope="row"] {
    padding-bottom: 8px;
  }

  .dream-ai .dai-data-table--compare td::before {
    content: attr(data-label);
    font-weight: 500;
    color: var(--text-secondary);
  }

  .dream-ai .dai-data-table--compare td:nth-child(2) {
    margin: 0 -8px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.dream-ai .dai-faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}

.dream-ai .dai-faq-list {
  border-top: 2px solid var(--ink);
}

.dream-ai .dai-faq-item {
  border-bottom: 1px solid var(--border-light);
}

.dream-ai .dai-faq-item__q {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--font-heading);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.dream-ai .dai-faq-item__q::-webkit-details-marker {
  display: none;
}

/* plus that turns into a minus when the answer is open */
.dream-ai .dai-faq-item__q::after {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  background:
    linear-gradient(var(--brand-red), var(--brand-red)) center / 14px 2px no-repeat,
    linear-gradient(var(--brand-red), var(--brand-red)) center / 2px 14px no-repeat;
  transition: transform 0.2s ease;
}

.dream-ai .dai-faq-item[open] .dai-faq-item__q::after {
  background: linear-gradient(var(--brand-red), var(--brand-red)) center / 14px 2px no-repeat;
  transform: rotate(180deg);
}

.dream-ai .dai-faq-item__q:hover {
  color: var(--brand-red-text);
}

.dream-ai .dai-faq-item__a {
  max-width: 64ch;
  padding: 0 30px 20px 0;
  font-size: var(--fs-15);
  line-height: 1.65;
  color: var(--text-secondary);
}

@media (max-width: 1024px) {
  .dream-ai .dai-faq-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dream-ai .dai-faq-item__q::after {
    transition: none;
  }
}

/* Honeypot field for spam bots — kept off-screen rather than display:none, which some bots skip */
.dream-ai .dai-form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 404 page */
.dream-ai .dai-not-found {
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.dream-ai .dai-not-found .dai-section-lead + .dai-section-lead {
  margin-top: -8px;
  color: var(--text-muted);
}

/* Very narrow phones (320 px): let series cards shrink and long configuration labels wrap */
.dream-ai .dai-model-card {
  min-width: 0;
}

@media (max-width: 360px) {
  .dream-ai .dai-variant-option {
    flex-wrap: wrap;
  }

  .dream-ai .dai-variant-option__mem {
    white-space: normal;
  }
}

/* Section bar slides away while scrolling down and comes back on scroll up (class set by initHideOnScroll
   in js/dream-ai.js). It also clears the DM header above it (--header-h), which stays where the DM site keeps it. */
.dream-ai .dai-section-bar {
  transition: transform 0.25s ease;
}

.dream-ai.dai-bars-hidden .dai-section-bar {
  transform: translateY(calc(-100% - var(--header-h)));
}

@media (prefers-reduced-motion: reduce) {
  .dream-ai .dai-section-bar {
    transition: none;
  }
}

/* ==========================================================================
   Dark mode — switched by the moon/sun button in the section bar (js/dream-ai.js: initTheme).
   Only token values change; header, section bar and footer are dark in both modes.
   ========================================================================== */
.dream-ai[data-theme="dark"] {
  color-scheme: dark;

  --bg-white: #161616;
  --bg-subtle: #1c1c1c;
  --bg-muted: #262626;
  --border-light: #2e2e2e;
  --border-medium: #474747;

  --text-primary: #f2f2f2;
  --text-secondary: #c9c9c9;
  --text-muted: #9c9c9c;

  --brand-red-soft: rgba(227, 6, 19, 0.14);
  --brand-red-text: #ff5a63;

  --status-green: #34d399;
  --status-green-soft: rgba(52, 211, 153, 0.12);

  --ink: #f2f2f2;
  --on-ink: #161616;
  --on-ink-muted: #474747;

  --success-text: #6ee7b7;
  --success-border: rgba(110, 231, 183, 0.35);
  --warn-bg: rgba(253, 230, 138, 0.08);
  --warn-border: rgba(253, 230, 138, 0.3);
  --warn-text: #fcd34d;
  --glass: rgba(22, 22, 22, 0.9);
  --hero-dots: #2f2f2f;
  --scroll-track: #0c0c0c;
  --scroll-thumb: #5a5a5a;
  --chart-cloud: #e8424b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.7);
}

/* Product photos keep their light studio background in both modes */
.dream-ai[data-theme="dark"] .dai-model-card__image,
.dream-ai[data-theme="dark"] .dai-hero-stage {
  background-color: var(--photo-plate);
}

/* Theme switch (right end of the section bar) */
.dream-ai .dai-theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: transparent !important;
  color: #ffffff;
  cursor: pointer;
}

.dream-ai .dai-theme-switch:hover {
  border-color: #ffffff;
}

.dream-ai .dai-theme-switch__sun {
  display: none;
}

.dream-ai[data-theme="dark"] .dai-theme-switch__sun {
  display: block;
}

.dream-ai[data-theme="dark"] .dai-theme-switch__moon {
  display: none;
}

/* ==========================================================================
   ROI calculator
   ========================================================================== */
.dream-ai .dai-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dream-ai .dai-roi-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.dream-ai .dai-roi-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 22px;
  font-size: var(--fs-14);
  color: var(--text-secondary);
}

.dream-ai .dai-roi-example {
  padding: 6px 12px;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  background: transparent !important;
  font-family: var(--font-body);
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.dream-ai .dai-roi-example:hover {
  border-style: solid;
  border-color: var(--ink);
}

.dream-ai .dai-roi-fields {
  margin-bottom: 24px;
}

.dream-ai .dai-roi-result__label {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--text-secondary);
}

.dream-ai .dai-roi-result__total {
  margin: 4px 0 2px;
  font-family: var(--font-heading);
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.dream-ai .dai-roi-result__monthly {
  font-size: var(--fs-14);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dream-ai .dai-roi-result__note strong {
  color: var(--brand-red-text);
  white-space: nowrap;
}

.dream-ai .dai-roi-result__note {
  margin: 14px 0 20px;
  font-size: var(--fs-15);
  line-height: 1.55;
  color: var(--text-primary);
}

.dream-ai .dai-roi-chart {
  margin: 0 0 12px;
}

.dream-ai .dai-roi-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 8px;
  font-size: var(--fs-13);
  color: var(--text-secondary);
}

.dream-ai .dai-roi-chart__legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dream-ai .dai-roi-swatch {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.dream-ai .dai-roi-swatch--cloud { background-color: var(--chart-cloud); }

.dream-ai .dai-roi-chart__plot {
  position: relative;
}

.dream-ai .dai-roi-chart__plot svg {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
}

.dream-ai .dai-roi-chart__grid {
  stroke: var(--border-light);
  stroke-width: 1;
}

.dream-ai .dai-roi-chart__axis {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.dream-ai .dai-roi-chart__cloud {
  stroke-width: 2;
  stroke-linecap: round;
}

.dream-ai .dai-roi-chart__cloud { stroke: var(--chart-cloud); }

.dream-ai .dai-roi-chart__hair {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.dream-ai .dai-roi-chart__dot {
  stroke: var(--bg-white);
  stroke-width: 2;
}

.dream-ai .dai-roi-chart__dot--cloud { fill: var(--chart-cloud); }

.dream-ai .dai-roi-chart__tip {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-md);
  font-size: var(--fs-12);
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.dream-ai .dai-roi-chart__tip[hidden] {
  display: none;
}

.dream-ai .dai-roi-chart__tip strong {
  color: var(--text-primary);
}

.dream-ai .dai-roi-chart__tip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dream-ai .dai-roi-data {
  margin-bottom: 18px;
  font-size: var(--fs-14);
}

.dream-ai .dai-roi-data summary {
  cursor: pointer;
  color: var(--text-secondary);
}

.dream-ai .dai-roi-table {
  min-width: 0;
  margin-top: 10px;
  font-size: var(--fs-13);
}

.dream-ai .dai-roi-table th,
.dream-ai .dai-roi-table td {
  padding: 6px 8px;
}

.dream-ai .dai-roi-disclaimer {
  margin-top: 12px;
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .dream-ai .dai-roi-layout {
    grid-template-columns: 1fr;
  }
}
