/* Viewport-height density for the recovered Stathen preview.
   The layout stays content-led; shorter screens compact spacing and product UI. */
:root {
  --announcement-height: 38px;
  --header-height: 78px;
  --nav-total-height: calc(var(--announcement-height) + var(--header-height));
  --viewport-available: calc(100svh - var(--nav-total-height));
  /* Compatibility alias for the first recovered preview stylesheet. */
  --available-fold: var(--viewport-available);
  --section-space-y: clamp(64px, 5.4vw, 88px);
  --section-heading-gap: 40px;
}
.section { padding-block: var(--section-space-y); }
.section-intro { margin-bottom: var(--section-heading-gap); }

/* Natural content sections stay content-led; article pages never inherit
   viewport sizing. The homepage hero is the only first-screen composition. */
.hero { min-height: 0; }
.insights-hero, .article-hero, .article-layout { height: auto; min-height: 0; }
.outcome-bridge, .care-section, .final-cta { min-height: 0; }
.product-theater { container: product-theater / inline-size; }

@container product-theater (max-width: 460px) {
  .theater-approval { right: 6px; width: min(176px, 48%); }
  .theater-match { left: 4px; max-width: 70%; gap: 8px; }
  .theater-match small { display: none; }
}

@media (min-width: 1024px) and (max-height: 949px) {
  :root {
    --section-space-y: clamp(48px, 5.5vh, 64px);
    --section-heading-gap: 30px;
  }
  .hero { padding-block: clamp(34px, 4.2vh, 42px) clamp(24px, 3.2vh, 30px); }
  .hero-copy h1 { font-size: clamp(48px, min(4.6vw, 6.4vh), 68px); }
  .hero-subtitle { font-size: clamp(16px, 1.3vw, 18px); margin-top: 18px; }
  .hero-actions { margin-top: 20px; }
  .product-theater { padding-block: 18px 30px; }
  .theater-match { padding: 11px 14px; }
  .theater-approval { padding: 14px; width: clamp(176px, 15vw, 205px); }
  .outcome-bridge { padding-block: clamp(42px, 4.6vh, 54px); }
  .insights-hero, .article-hero { padding-block: clamp(54px, 6vh, 72px); }
  .article-layout { padding-block: clamp(56px, 6vh, 72px); }
}

@media (min-width: 1024px) and (max-height: 819px) {
  :root {
    --section-space-y: clamp(42px, 5.3vh, 52px);
    --section-heading-gap: 24px;
  }
  .hero { padding-block: clamp(22px, 3.2vh, 28px) clamp(16px, 2.5vh, 22px); }
  .hero-grid { gap: clamp(20px, 2.2vw, 30px); }
  .hero-copy h1 { font-size: clamp(44px, min(4.2vw, 6vh), 56px); line-height: 1.02; }
  .hero-copy .eyebrow { margin-bottom: 16px; }
  .hero-subtitle { font-size: 16px; line-height: 1.5; margin-top: 14px; }
  .hero-actions { margin-top: 16px; gap: 16px; }
  .hero-actions .button { min-height: 48px; padding: 12px 17px; }
  .product-theater { padding-block: 10px 21px; }
  .theater-main { border-radius: 8px; }
  .theater-chrome { height: 40px; padding-inline: 14px; }
  .theater-workspace > div { padding: 14px 18px 12px; }
  .compact .ui-kpi { margin-bottom: 9px; }
  .compact .chart-wrap svg { height: clamp(136px, 19vh, 170px); }
  .compact .chart-dates { margin-top: 6px; }
  .theater-caption { padding-top: 10px; }
  .theater-match { top: 5px; left: -12px; padding: 9px 11px; }
  .theater-approval { right: -4px; bottom: 18px; padding: 11px; width: 176px; }
  .theater-approval strong { font-size: 23px; }
  .theater-approval button { min-height: 30px; margin-top: 8px; padding: 8px; }
  .outcome-bridge { padding-block: 38px; }
  .solution-tabs button { padding: 13px 14px; }
  .solution-tabs b { font-size: 18px; }
  .solution-stage { padding: 20px 24px; }
  .solution-stage-top { margin-bottom: 18px; }
  .solution-stage .ui-frame { min-height: 0; }
  .ui-title { padding: 13px 18px; }
  .ui-content { padding: 18px; }
  .ui-kpi { margin-bottom: 16px; }
  .operations-intro { margin-bottom: 24px; }
  .feature { padding-block: 30px 38px; gap: clamp(28px, 4vw, 56px); }
  .reconcile-story { padding-block: 40px; margin-block: 4px; }
  .founders-section { padding-block: 52px; }
  .care-section { padding-block: 32px; }
  .final-cta { padding-block: clamp(40px, 5vh, 52px); }
  .diagnostic-sheet { padding: 22px; }
  .method-section .section-intro { margin-bottom: 28px; }
  .method-track { gap: 24px; }
  .plans-grid { gap: 16px; }
  .plan-card { padding: 26px; }
  .insights-hero, .article-hero { padding-block: 48px; }
  .article-layout { padding-block: 48px; }
  .article-body > section { margin-bottom: 38px; }
}

@media (min-width: 1600px) {
  .hero-copy h1 { font-size: clamp(54px, 3.35vw, 64px); }
}

@media (min-width: 1024px) and (max-height: 719px) {
  :root { --section-space-y: 40px; --section-heading-gap: 20px; }
  .hero { padding-block: 18px 14px; }
  .hero-copy h1 { font-size: clamp(42px, 4.1vw, 50px); }
  .hero-copy .eyebrow { font-size: 10px; margin-bottom: 12px; }
  .hero-subtitle { font-size: 15px; line-height: 1.45; margin-top: 11px; }
  .hero-actions { margin-top: 13px; }
  .hero-actions .button { min-height: 44px; padding: 10px 15px; font-size: 12px; }
  .product-theater { padding-block: 4px 16px; }
  .compact .chart-wrap svg { height: 124px; }
  .theater-footer { padding-block: 8px; }
  .theater-approval { bottom: 14px; }
  .theater-match { top: 2px; }
  .solution-tabs button { padding: 11px 13px; }
  .stage-grid article { padding: 24px; }
  .stage-spark, .stage-bars { height: 88px; }
  .stage-index { margin-bottom: 16px; }
  .routine-list { gap: 8px; padding-block: 18px 6px; }
  .method-track article p { margin-top: 12px; }
  .plan-card { padding: 22px; }
  .diagnostic-sheet { padding: 18px; }
  .insights-hero, .article-hero { padding-block: 40px; }
}

@media (min-width: 1024px) and (max-height: 700px) {
  :root { --section-space-y: 36px; --section-heading-gap: 18px; }
  .hero { padding-block: 14px 10px; }
  .product-theater { padding-block: 0 12px; }
  .compact .chart-wrap svg { height: 112px; }
  .outcome-bridge { padding-block: 30px; }
  .feature { padding-block: 24px 28px; }
  .reconcile-story { padding-block: 30px; }
  .founders-section { padding-block: 40px; }
  .final-cta { padding-block: 32px; }
  .article-layout { padding-block: 36px; }
}

@media (max-width: 960px) { :root { --header-height: 70px; } }
@media (max-width: 680px) {
  :root { --announcement-height: 34px; --header-height: 66px; }
}
@media (max-width: 767px) and (max-height: 760px) {
  .hero { padding-block: 26px 16px; }
  .hero-copy .eyebrow { margin-bottom: 14px; }
  .hero-copy h1 { font-size: clamp(34px, 9vw, 42px); }
  .hero-subtitle { font-size: 15px; line-height: 1.5; margin-top: 14px; }
  .hero-actions { margin-top: 16px; }
  .product-theater { padding-block: 8px 18px; }
  .compact .chart-wrap svg { height: clamp(126px, 23vh, 166px); }
  .floating-whatsapp { width: 54px; height: 54px; }
}
@media (max-width: 767px) {
  .floating-whatsapp {
    width: 50px;
    height: 50px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .floating-whatsapp svg { width: 27px; height: 27px; }
}
@media (max-width: 390px) {
  .operations-intro h2 { font-size: 32px; }
  .floating-whatsapp { width: 48px; height: 48px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* Keep the management insight beside the DRE, below the complete table. */
@media (min-width: 1024px) {
  .feature-reports .scene-reports {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
  }
  .feature-reports .report-note {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 13px;
    box-shadow: none;
  }
  .feature-reports .report-note b { margin: 0; font-size: 13px; }
  .feature-reports .report-note p { margin: 0; font-size: 9px; }
}

/* Art direction: one composed product surface, with the cash curve as the
   primary read and operational status kept in a calm, integrated side rail. */
@media (min-width: 1024px) {
  .product-theater {
    grid-template-columns: minmax(0, 1.88fr) minmax(176px, .82fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0 0;
    align-items: stretch;
    padding: 0;
    border: 1px solid #d6ded9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 48px -38px #243f4150, 0 2px 8px #243f4109;
  }
  .theater-orbit { display: none; }
  .theater-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    border: 0;
    border-radius: 11px 0 0 0;
    box-shadow: none;
    background: transparent;
  }
  .theater-chrome {
    height: 44px;
    padding-inline: 16px;
    border-bottom-color: #e8ece9;
  }
  .theater-workspace { grid-template-columns: minmax(0, 1fr); }
  .theater-workspace > aside { display: none !important; }
  .theater-workspace > div { min-width: 0; padding: 16px 18px 14px; }
  .theater-heading { margin-bottom: 10px; font-size: 11px; }
  .theater-heading span { padding: 4px 7px; font-size: 8px; }
  .compact .ui-kpi { margin-bottom: 7px; }
  .compact .ui-kpi small { margin-bottom: 4px; font-size: 9px; }
  .compact .ui-kpi strong { font-size: clamp(30px, 2.35vw, 38px); }
  .theater-main .ui-tabs { margin-bottom: 7px; }
  .theater-main .ui-tabs button { min-height: 26px; padding: 5px 9px; font-size: 9px; }
  .theater-main .chart-wrap { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .theater-main .chart-axis { padding: 10px 0 18px; font-size: 8px; }
  .theater-main .chart-wrap svg { height: clamp(126px, 17vh, 158px); }
  .theater-main .chart-wrap svg .chart-grid,
  .theater-main .chart-wrap svg .chart-area,
  .theater-main .chart-wrap svg .chart-baseline,
  .theater-main .chart-wrap svg .chart-line { vector-effect: non-scaling-stroke; }
  .theater-main .chart-wrap svg { display: block; }
  .theater-main .chart-dates { margin-top: 4px; padding-left: 42px; font-size: 8px; }
  .theater-footer { padding: 9px 18px; font-size: 8px; }
  .theater-approval, .theater-match {
    position: relative;
    inset: auto;
    z-index: auto;
    width: auto;
    min-width: 0;
    margin: 0;
    align-self: stretch;
    animation: none;
    box-shadow: none;
  }
  .theater-approval {
    grid-column: 2;
    grid-row: 1;
    align-content: center;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "label" "document" "amount" "action";
    gap: 10px;
    padding: 18px 16px;
    border: 0;
    border-left: 1px solid #e8ece9;
    border-radius: 0 11px 0 0;
    background: #f7f8f6;
  }
  .floating-label { font-size: 8px; }
  .approval-line { gap: 9px; }
  .approval-line b { font-size: 10px; }
  .approval-line small { font-size: 9px; }
  .theater-approval > strong { font-size: clamp(22px, 2vw, 28px); }
  .theater-approval button { min-height: 32px; margin-top: 1px; padding: 8px 10px; }
  .theater-match {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--petrol);
    background: #f7f8f6;
    border: 0;
    border-top: 1px solid #e8ece9;
    border-left: 1px solid #e8ece9;
    border-radius: 0 0 11px 0;
  }
  .theater-match b { font-size: 10px; }
  .theater-match small { color: var(--muted); font-size: 8px; }
  .theater-match .round-check { flex: 0 0 25px; width: 25px; height: 25px; color: var(--petrol); background: #e7eee9; }
  .match-mini-bars { display: none; }
  .theater-caption {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    inset: auto;
    align-self: center;
    margin: 0;
    padding: 10px 16px;
    border-top: 1px solid #e8ece9;
    font-size: 8px;
  }
}

@media (min-width: 1024px) and (max-height: 819px) {
  .theater-main .chart-wrap svg { height: clamp(112px, 15vh, 134px); }
  .theater-approval { gap: 7px; padding: 13px 14px; }
  .theater-match { padding: 9px 13px; }
  .theater-caption { padding-block: 8px; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .product-theater { grid-template-columns: minmax(0, 1.7fr) minmax(164px, .9fr); }
  .theater-workspace > div { padding-inline: 14px; }
  .theater-approval { padding-inline: 12px; }
  .theater-match { padding-inline: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-theater, .theater-main, .theater-approval, .theater-match { animation: none !important; }
}
@media (min-width: 1024px) and (max-height: 819px) {
  .feature-reports .scene-reports { gap: 8px; }
  .feature-reports .report-note { padding: 8px 10px; }
}

/* Product finish: keep the Hero dashboard level and give its actions a
   deliberate home beneath the chart instead of floating over data. */
@media (min-width: 1024px) {
  .hero { overflow-x: clip; overflow-y: visible; }
  .hero-grid { align-items: center; }
  .product-theater {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 10px 12px;
    padding-block: 18px 4px;
  }
  .theater-main { grid-column: 1 / -1; transform: none; }
  .theater-chrome { height: 42px; }
  .theater-workspace > div { padding: 13px 17px 11px; }
  .theater-heading { margin-bottom: 12px; }
  .compact .ui-kpi { margin-bottom: 8px; }
  .compact .chart-wrap svg { height: clamp(112px, 15vh, 148px); }
  .compact .chart-dates { margin-top: 5px; }
  .theater-footer { padding-block: 8px; }
  .theater-match {
    position: relative; inset: auto; z-index: auto;
    align-self: stretch; min-width: 0; padding: 9px 11px;
    gap: 8px; color: var(--petrol); background: #f4f6f3;
    border: 1px solid var(--line); box-shadow: none; animation: none;
  }
  .theater-match small { color: var(--muted); }
  .theater-match .round-check { width: 24px; height: 24px; color: var(--petrol); background: #b5c7b840; }
  .match-mini-bars { height: 20px; margin-left: auto; }
  .theater-approval {
    position: relative; inset: auto; z-index: auto;
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label label" "document amount" "action action";
    align-items: center; gap: 5px 8px; width: auto; min-width: 0;
    padding: 8px 11px; box-shadow: none; animation: none;
  }
  .floating-label { grid-area: label; }
  .approval-line { grid-area: document; min-width: 0; margin: 0; }
  .approval-line > div { min-width: 0; }
  .approval-line b { font-size: 9px; }
  .approval-line small { font-size: 8px; }
  .theater-approval > strong { grid-area: amount; font-size: 18px; white-space: nowrap; }
  .theater-approval sup { font-size: 10px; }
  .theater-approval button { grid-area: action; min-height: 28px; margin: 1px 0 0; padding: 6px 8px; }
  .theater-caption {
    position: relative; inset: auto; grid-column: 1 / -1;
    padding-top: 7px; margin-top: 1px;
  }
  .floating-whatsapp { width: 66px; height: 66px; right: 26px; bottom: calc(26px + env(safe-area-inset-bottom)); }
  .floating-whatsapp svg { width: 32px; height: 32px; flex: none; }
  .hero-actions .text-link {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none; position: relative;
    transition: color .18s ease;
  }
  .hero-actions .text-link::after {
    content: ""; position: absolute; left: 42px; right: 0; bottom: -4px;
    height: 1px; background: currentColor; transform: scaleX(0);
    transform-origin: left; transition: transform .18s ease;
  }
  .hero-actions .text-link:hover::after,
  .hero-actions .text-link:focus-visible::after { transform: scaleX(1); }
  .hero-actions .text-link:focus-visible,
  .theater-approval button:focus-visible,
  .solution-tabs button:focus-visible,
  .floating-whatsapp:focus-visible {
    outline: 2px solid var(--coral); outline-offset: 4px;
  }
  #como-funciona { scroll-margin-top: calc(var(--nav-total-height) + 16px); }
  .solution-stage .panel-transition { height: 404px; min-height: 404px; }
  .solution-stage .ui-frame { height: 100%; min-height: 0; display: flex; flex-direction: column; }
  .solution-stage .ui-title { flex: none; padding: 12px 16px; }
  .solution-stage .ui-content { flex: 1; min-height: 0; padding: 15px 16px; }
  .solution-stage .ui-kpi { margin-bottom: 10px; }
  .solution-stage .chart-wrap svg { height: 132px; }
  .solution-stage .cash-summary { gap: 9px; margin-top: 12px; padding-top: 10px; }
  .solution-stage .data-table { margin-top: 6px; }
  .solution-stage .table-head,
  .solution-stage .table-row { padding-block: 8px; }
  .solution-stage .report-kpis { gap: 14px; margin-bottom: 8px; }
  .solution-stage .report-kpis strong { margin-block: 3px; font-size: 28px; }
  .solution-stage .report-kpis strong span { font-size: 15px; }
  .solution-stage .dre-table > div { gap: 8px; padding-block: 7px; }
  .solution-stage .dre-table .total { margin-top: 3px; padding: 8px; }
  .feature { gap: clamp(32px, 4vw, 64px); padding-block: clamp(32px, 4vh, 40px); }
  .feature-scene.scene-cash { padding: 16px; }
  .feature-scene .scene-label { margin-bottom: 10px; }
  .feature-scene .ui-title { padding: 12px 16px; }
  .feature-scene .ui-content { padding: 14px 16px; }
  .feature-scene .chart-wrap svg { height: clamp(112px, 15vh, 145px); }
  .feature-scene .ui-kpi { margin-bottom: 10px; }
  .feature-scene .cash-summary { gap: 8px; margin-top: 12px; padding-top: 10px; }
  .feature-scene .scene-note { margin: 11px 4px 0; gap: 8px; }
  .feature-scene .scene-note small { font-size: 9px; }
  .feature-pay .scene-pay { padding: 20px 0 18px 24px; }
  .feature-pay .payment-slip { width: 150px; height: 174px; padding: 12px; }
  .feature-pay .payment-slip strong { margin-block: 12px; font-size: 30px; }
  .feature-pay .payment-caption { margin-top: 12px; }
  .reconcile-story { margin-block: 12px; padding-block: clamp(36px, 5vh, 48px); }
  .reconcile-scene { padding: 14px 12px; }
  .feature-reports .report-note { margin-top: 10px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .product-theater { display: flex; flex-direction: column; gap: 10px; padding-block: 16px 24px; }
  .theater-main { transform: none; }
  .theater-match, .theater-approval { position: relative; inset: auto; animation: none; box-shadow: none; }
  .theater-match { align-self: flex-start; margin-left: 8px; }
  .theater-approval { align-self: flex-end; width: min(88%, 260px); margin-top: -8px; }
  .theater-caption { position: relative; inset: auto; margin-top: 8px; }
}

@media (min-width: 1024px) and (max-height: 819px) {
  .solution-stage .panel-transition { height: 368px; min-height: 368px; }
  .solution-stage .chart-wrap svg { height: 118px; }
  .feature { padding-block: 28px 32px; }
  .feature-scene .chart-wrap svg { height: 118px; }
  .feature-pay .scene-pay { padding-block: 16px 14px; }
  .reconcile-story { padding-block: 34px; }
}

@media (min-width: 1024px) and (max-height: 719px) {
  .solution-stage .panel-transition { height: 338px; min-height: 338px; }
  .solution-stage .chart-wrap svg { height: 104px; }
  .feature { padding-block: 24px; }
  .feature-scene .chart-wrap svg { height: 104px; }
  .reconcile-story { padding-block: 28px; }
}

/* Keep the floating contact action clear of the final label on short screens. */
@media (min-width: 1024px) and (max-height: 819px) {
  .theater-caption { padding-right: 96px; }
}

/* The payment reminder is part of the scene, not a layer over the product UI. */
@media (min-width: 1024px) {
  .feature-pay .scene-pay {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
  }
  .feature-pay .payment-slip {
    position: relative;
    inset: auto;
    transform: none;
    display: grid;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 9px 13px;
    border: 1px solid #cd483c30;
    border-radius: 7px;
  }
  .feature-pay .payment-slip small { font-size: 8px; letter-spacing: .08em; }
  .feature-pay .payment-slip strong { margin: 0; font-size: 16px; }
  .feature-pay .payment-slip > span { font-size: 9px; line-height: 1.35; }
  .feature-pay .payment-slip i { display: none; }
  .feature-pay .payment-caption { margin-top: 2px; }
}

@media (max-width: 1023px) {
  .hero { overflow-x: clip; overflow-y: visible; }
  .hero-actions .text-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
  .hero-actions .text-link:focus-visible,
  .solution-tabs button:focus-visible,
  .floating-whatsapp:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }
  #como-funciona { scroll-margin-top: calc(var(--nav-total-height) + 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-actions .text-link::after { transition: none; }
  .theater-match, .theater-approval { animation: none; }
}

/* Final desktop cascade: the side rail stays in its own grid track, while the
   cash chart uses the full primary track. */
@media (min-width: 1024px) {
  .product-theater {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(176px, .82fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: visible;
    border: 1px solid #d6ded9;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 48px -38px #243f4150, 0 2px 8px #243f4109;
  }
  .theater-main { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; border: 0; border-radius: 11px 0 0 0; box-shadow: none; transform: none; background: transparent; }
  .theater-workspace { grid-template-columns: minmax(0, 1fr); }
  .theater-workspace > aside { display: none !important; }
  .theater-workspace > div { min-width: 0; padding: 16px 18px 14px; }
  .theater-heading { margin-bottom: 10px; font-size: 11px; }
  .compact .ui-kpi { margin-bottom: 7px; }
  .compact .ui-kpi small { margin-bottom: 4px; font-size: 9px; }
  .compact .ui-kpi strong { font-size: clamp(30px, 2.35vw, 38px); }
  .theater-main .ui-tabs { margin-bottom: 7px; }
  .theater-main .ui-tabs button { min-height: 26px; padding: 5px 9px; font-size: 9px; }
  .theater-main .chart-wrap { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .theater-main .chart-axis { padding: 10px 0 18px; font-size: 8px; }
  .theater-main .chart-wrap svg { display: block; height: clamp(126px, 17vh, 158px); }
  .theater-main .chart-dates { margin-top: 4px; padding-left: 42px; font-size: 8px; }
  .theater-footer { padding: 9px 18px; font-size: 8px; }
  .theater-approval, .theater-match { position: relative; inset: auto; z-index: auto; width: auto; min-width: 0; margin: 0; align-self: stretch; animation: none; box-shadow: none; }
  .theater-approval { grid-column: 2; grid-row: 1; align-content: start; grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "document" "amount" "action"; gap: 12px; padding: clamp(28px, 4vw, 48px) 18px 18px; border: 0; border-left: 1px solid #e8ece9; border-radius: 0 11px 0 0; background: #f7f8f6; }
  .floating-label { font-size: 8px; }
  .approval-line { gap: 9px; }
  .approval-line b { font-size: 10px; }
  .approval-line small { font-size: 9px; }
  .theater-approval > strong { font-size: clamp(22px, 2vw, 28px); }
  .theater-approval button { min-height: 32px; margin-top: 1px; padding: 8px 10px; }
  .theater-match { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--petrol); background: #f7f8f6; border: 0; border-top: 1px solid #e8ece9; border-left: 1px solid #e8ece9; border-radius: 0 0 11px 0; }
  .theater-match b { font-size: 10px; }
  .theater-match small { color: var(--muted); font-size: 8px; }
  .theater-match .round-check { flex: 0 0 25px; width: 25px; height: 25px; color: var(--petrol); background: #e7eee9; }
  .match-mini-bars { display: none; }
  .theater-caption { position: relative; inset: auto; grid-column: 1; grid-row: 2; align-self: center; margin: 0; padding: 10px 16px; border-top: 1px solid #e8ece9; font-size: 8px; }
}
@media (min-width: 1024px) and (max-height: 819px) {
  .theater-main .chart-wrap svg { height: clamp(112px, 15vh, 134px); }
  .theater-approval { gap: 8px; padding-top: 24px; padding-bottom: 14px; }
  .theater-match, .theater-caption { padding-block: 8px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .product-theater { grid-template-columns: minmax(0, 1.72fr) minmax(164px, .9fr); }
  .theater-workspace > div { padding-inline: 14px; }
  .theater-approval { padding-inline: 12px; }
  .theater-match { padding-inline: 11px; }
}

/* Final refinements: retain the brand mark in the same-origin preview and
   remove the decorative workspace rail at every breakpoint. */
.theater-workspace > aside { display: none !important; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero-copy h1 { font-size: clamp(46px, 4.05vw, 52px); line-height: 1.04; }
  .hero-copy h1 span { white-space: nowrap; }
}
@media (max-width: 1023px) {
  .theater-workspace > aside { display: none !important; }
}
@media (max-width: 767px) {
  .product-theater {
    display: flex; flex-direction: column; gap: 0; padding: 0;
    overflow: visible; border: 1px solid #d6ded9; border-radius: 11px;
    background: #fff; box-shadow: 0 12px 32px -28px #243f4150;
  }
  .theater-main { width: 100%; transform: none; border: 0; border-radius: 10px 10px 0 0; box-shadow: none; }
  .theater-chrome { height: 42px; padding-inline: 13px; gap: 8px; font-size: 10px; }
  .theater-chrome img { width: 20px; height: 20px; object-fit: contain; }
  .theater-workspace { grid-template-columns: minmax(0, 1fr); }
  .theater-workspace > aside { display: none !important; }
  .theater-workspace > div { min-width: 0; padding: 13px 13px 11px; }
  .theater-heading { gap: 8px; margin-bottom: 13px; font-size: 10px; }
  .theater-heading span { flex: 0 0 auto; white-space: nowrap; padding: 4px 6px; font-size: 8px; }
  .compact .ui-kpi { margin-bottom: 8px; }
  .compact .ui-kpi small { font-size: 9px; }
  .compact .ui-kpi strong { font-size: clamp(28px, 8vw, 34px); }
  .theater-main .ui-tabs { margin-bottom: 8px; }
  .theater-main .chart-wrap { grid-template-columns: 31px minmax(0, 1fr); gap: 6px; }
  .theater-main .chart-wrap svg { display: block; width: 100%; height: clamp(124px, 38vw, 150px); }
  .theater-main .chart-axis { padding-block: 8px 18px; font-size: 8px; }
  .theater-main .chart-dates { padding-left: 37px; font-size: 8px; }
  .theater-footer { padding: 8px 13px; font-size: 8px; }
  .theater-approval, .theater-match {
    position: relative; inset: auto; z-index: auto; width: auto; min-width: 0;
    margin: 0; animation: none; box-shadow: none;
  }
  .theater-approval {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label label" "document amount" "action action";
    align-items: center; gap: 7px 10px; padding: 11px 13px;
    border: 0; border-top: 1px solid #e8ece9; border-radius: 0;
    background: #f7f8f6;
  }
  .floating-label { font-size: 8px; }
  .approval-line { gap: 8px; margin: 0; }
  .approval-line b { font-size: 10px; }
  .approval-line small { font-size: 8px; }
  .theater-approval > strong { font-size: 19px; white-space: nowrap; }
  .theater-approval button { grid-area: action; min-height: 34px; margin: 1px 0 0; }
  .theater-match {
    display: flex; align-items: center; gap: 9px; padding: 9px 13px;
    border: 0; border-top: 1px solid #e8ece9; border-radius: 0 0 10px 10px;
    background: #f7f8f6;
  }
  .theater-match .round-check { flex: 0 0 23px; width: 23px; height: 23px; }
  .theater-match b { font-size: 10px; }
  .theater-match small { font-size: 8px; }
  .match-mini-bars { display: none; }
  .theater-caption { position: relative; inset: auto; margin: 0; padding: 7px 12px; font-size: 8px; }
}
