/* ============================================================================
   GIXO APP DESIGN SYSTEM  —  .gxds
   ----------------------------------------------------------------------------
   An opt-in layer that gives app surfaces the same craft the marketing pages
   already have: the brand's Manrope display type, a real scale with tracking,
   deliberate rhythm, and polished surface/chip/tile components.

   • Opt in by adding class="gxds" to a page's top-level container.
   • Everything is scoped under .gxds, so pages that don't opt in are untouched.
   • Built entirely on the existing --gixo-* tokens, so it flips light/dark with
     the rest of the app — no new theme code.
   Pilot surface: the Dashboard (/dashboard).
   ============================================================================ */

.gxds{
  --gxds-display:var(--product-headline-font, 'Manrope', 'Inter', system-ui, sans-serif);
  /* Re-point MudBlazor's per-level heading family vars to the product face (inherited,
     so it wins by the cascade, not by !important). */
  --mud-typography-h1-family:var(--gxds-display);
  --mud-typography-h2-family:var(--gxds-display);
  --mud-typography-h3-family:var(--gxds-display);
  --mud-typography-h4-family:var(--gxds-display);
  --mud-typography-h5-family:var(--gxds-display);
  --mud-typography-h6-family:var(--gxds-display);
}

/* Heading tags and Mud classes read the same product display token. */
.gxds :is(h1,h2,h3,h4,h5,h6):not(.product-headline),
.gxds :is(.mud-typography-h1,.mud-typography-h2,.mud-typography-h3,
          .mud-typography-h4,.mud-typography-h5,.mud-typography-h6){
  font-family:var(--gxds-display);
  letter-spacing:-.022em;
  line-height:1.12;
  text-wrap:balance;
}
.gxds :is(.mud-typography-h1,.mud-typography-h2,.mud-typography-h3,.mud-typography-h4){
  font-weight:800;letter-spacing:-.03em;line-height:1.06;
}
.gxds :is(.mud-typography-h5,.mud-typography-h6){font-weight:700;letter-spacing:-.014em;}

/* ---- Hero: the "designed moment" a dashboard header should have ---- */
.gxds-hero{
  display:flex;align-items:flex-end;justify-content:space-between;gap:1.25rem;
  flex-wrap:wrap;margin:0 0 1.75rem;
}
.gxds-hero__eyebrow{
  font-family:var(--gxds-display);font-weight:700;font-size:.72rem;letter-spacing:.14em;
  text-transform:uppercase;color:var(--gixo-primary);margin:0 0 .55rem;
}
/* Double .gxds scope → (0,2,0), decisively above `.product-scope h1` (0,1,1). */
.gxds .gxds-hero__title{
  font-family:var(--gxds-display);font-weight:800;letter-spacing:-.03em;
  font-size:clamp(1.65rem,3.2vw,2.35rem);line-height:1.04;color:var(--gixo-text-primary);
  margin:0;text-wrap:balance;
}
.gxds-hero__lede{
  color:var(--gixo-text-secondary);font-size:1.02rem;line-height:1.55;margin:.5rem 0 0;max-width:56ch;
}

/* ---- Eyebrow / section label ---- */
.gxds-eyebrow{
  font-family:var(--gxds-display);font-weight:700;font-size:.68rem;letter-spacing:.15em;
  text-transform:uppercase;color:var(--gixo-text-muted);margin:0 0 .95rem;display:block;
}

/* ---- Status pills: encode state in colour + shape, separate from the accent ---- */
.gxds-pill{
  display:inline-flex;align-items:center;gap:.35rem;font-weight:700;font-size:.66rem;
  letter-spacing:.03em;padding:.28rem .62rem;border-radius:999px;white-space:nowrap;line-height:1;
}
.gxds-pill::before{content:"";width:.42rem;height:.42rem;border-radius:50%;background:currentColor;opacity:.9;}
.gxds-pill--draft {color:var(--gixo-text-muted);background:var(--gixo-surface-light);border:1px solid var(--gixo-border);}
.gxds-pill--review{color:var(--gixo-warning);background:color-mix(in srgb,var(--gixo-warning) 13%,transparent);}
.gxds-pill--ready {color:var(--gixo-success);background:color-mix(in srgb,var(--gixo-success) 13%,transparent);}
.gxds-pill--live  {color:var(--gixo-primary);background:color-mix(in srgb,var(--gixo-primary) 13%,transparent);}

/* ---- Elevated panel + tile: consistent radius, real shadow, hover lift ---- */
.gxds-panel{
  background:var(--gixo-card);border:1px solid var(--gixo-border);border-radius:16px;
  box-shadow:var(--gixo-shadow-sm);
}
.gxds-tile{
  position:relative;background:var(--gixo-card);border:1px solid var(--gixo-border);
  border-radius:16px;box-shadow:var(--gixo-shadow-sm);overflow:hidden;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.gxds-tile:hover{transform:translateY(-3px);box-shadow:var(--gixo-shadow-md);border-color:var(--gixo-border-hover);}
.gxds-tile__rail{position:absolute;inset:0 0 auto 0;height:3px;background:var(--gxds-accent,var(--gixo-primary));}

/* ---- A branded card header (icon chip + title), used on the trial/CTA card ---- */
.gxds-cardhead{display:flex;align-items:center;gap:.85rem;}
.gxds-cardhead__ico{
  width:40px;height:40px;border-radius:11px;flex:none;display:grid;place-items:center;
  background:color-mix(in srgb,var(--gixo-primary) 14%,transparent);color:var(--gixo-primary);
}
.gxds-cardhead__ico .mud-icon-root{font-size:1.35rem;}

/* ============================================================================
   DASHBOARD SURFACE  —  brings the whole /dashboard up to the hero's craft.
   Every rule is scoped under .gxds and enhances the EXISTING structure
   (hero, sticky create button, "Your work" toolbar, ContentGrid list/grid,
   quickstart) — no markup surgery, flips light/dark via --gixo-* tokens.
   ============================================================================ */

/* --- Integrate the sticky create "+" into the hero row, killing the dead band
       it used to float in. It stays sticky; it just starts life at the hero's
       right edge instead of in an empty strip below it. --- */
.gxds .gxds-hero{margin:1.9rem 1.5rem .35rem;}
.gxds .plus-actions-container{
  margin-top:-4.35rem;          /* lift level with the hero title */
  margin-bottom:1.15rem;
  justify-content:flex-end;
  padding:0 1.5rem 0 0;
  background:transparent;       /* was a filled sticky band */
}
.gxds .plus-actions-container .plus-action-btn{box-shadow:var(--gixo-shadow-md);}

/* --- "Your work" toolbar → a real elevated panel --- */
.gxds .dashboard-grid-toolbar{
  border:1px solid var(--gixo-border);
  border-radius:18px;
  box-shadow:var(--gixo-shadow-sm);
}
.gxds .dashboard-toolbar-top > .mud-typography{   /* the "Your work" heading */
  font-family:var(--gxds-display);font-weight:800;letter-spacing:-.02em;font-size:1.2rem;
}

/* --- Work list rows → tactile cards with a hover lift (accent rail kept) --- */
.gxds .list-row{
  border:1px solid var(--gixo-border);
  border-radius:14px;
  box-shadow:var(--gixo-shadow-sm);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.gxds .list-row:hover{
  transform:translateY(-2px);
  box-shadow:var(--gixo-shadow-md);
  border-color:var(--gixo-border-hover);
}
.gxds .list-row-title{font-family:var(--gxds-display);font-weight:700;letter-spacing:-.01em;}

/* --- Grid preview cards → same radius + lift language --- */
.gxds .gixo-preview-card{
  border-radius:16px;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.gxds .gixo-preview-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--gixo-shadow-md);
  border-color:var(--gixo-border-hover);
}

/* --- Status badges → one consistent pill language --- */
.gxds :is(.status-ok,.review-badge,.failed-badge,.processing-badge,.new-badge,.lifecycle-badge){
  display:inline-flex;align-items:center;gap:.34rem;
  font-weight:700;font-size:.68rem;letter-spacing:.02em;line-height:1;
  padding:.3rem .62rem;border-radius:999px;white-space:nowrap;
}

/* --- Quickstart / "Start here" cards → the tile hover language --- */
.gxds .quickstart-card{
  border-radius:16px;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.gxds .quickstart-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--gixo-shadow-md);
  border-color:var(--gixo-border-hover);
}

/* --- Analytics band (below the work list): stat tiles, roadmap, charts →
       the same tile/panel language so the whole page reads as one surface. --- */

/* Stat tiles: rounder, real hover-lift, and the big numbers in the display face */
.gxds .gixo-stat-card{border-radius:16px;box-shadow:var(--gixo-shadow-sm);}
.gxds .gixo-stat-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--gixo-shadow-md);
  border-color:var(--gixo-border-hover);
}
.gxds .gixo-stat-card .stat-value{
  font-family:var(--gxds-display);font-weight:800;letter-spacing:-.03em;
}

/* Content Roadmap widget → consistent panel + suggestion mini-cards */
.gxds .roadmap-widget{
  border:1px solid var(--gixo-border);
  border-radius:18px;
  box-shadow:var(--gixo-shadow-sm);
}
.gxds .suggestion-item{
  border-radius:12px;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.gxds .suggestion-item:hover{
  transform:translateY(-2px);
  box-shadow:var(--gixo-shadow-sm);
  border-color:var(--gixo-border-hover);
}

/* Chart panels (tagged .gxds-analytics-panel in markup; the inline border/bg
   stays, we just round + elevate to match). .gxds double-scope beats MudPaper. */
.gxds .gxds-analytics-panel{
  border-radius:18px;
  box-shadow:var(--gixo-shadow-sm);
}

/* ============================================================================
   APP-WIDE EDITORIAL SURFACE
   ----------------------------------------------------------------------------
   Shared look-and-feel for operational Gixo UI. MainLayout, AuthLayout and the
   operational branch of WebPageLayout all opt in through .gixo-app-surface.
   Public marketing layouts and generated document/slide/story canvases do not.

   This layer owns only typography, scale, spacing, shape and interaction
   rhythm. It declares no palette or mode values: the app's dark/light tokens,
   product brand scopes and independently selected output themes still own
   color and generated-artifact presentation.
   ============================================================================ */

/* UX2-03 application rules: align with spacing and quiet 1px dividers. Cards
   group related work; never put a card inside a card. One filled primary action
   per screen; outlined is secondary, text is tertiary. Content reading sizes
   and generated output remain owned by their document styles. */
.gixo-app-surface {
  --gixo-editorial-display: var(--product-headline-font, 'Manrope', 'Inter', system-ui, sans-serif);
  --gixo-space-1: 4px;
  --gixo-space-2: 8px;
  --gixo-space-3: 12px;
  --gixo-space-4: 16px;
  --gixo-space-5: 20px;
  --gixo-space-6: 24px;
  --gixo-space-7: 28px;
  --gixo-space-8: 32px;
  --gixo-space-9: 36px;
  --gixo-space-10: 40px;
  --gixo-space-11: 44px;
  --gixo-space-12: 48px;
  --gixo-radius-sm: 6px;
  --gixo-radius: 8px;
  --gixo-radius-md: 12px;
  --gixo-radius-lg: 16px;
  --gixo-editorial-radius-sm: var(--gixo-radius-sm);
  --gixo-editorial-radius-md: var(--gixo-radius-md);
  --gixo-editorial-radius-lg: var(--gixo-radius-lg);
  --gixo-editorial-page-gutter: var(--gixo-space-6);
  --gixo-editorial-section-space: var(--gixo-space-8);
  --gixo-heading-1: 24px;
  --gixo-heading-2: 20px;
  --gixo-heading-3: 18px;
  --gixo-heading-4: 16px;
  --gixo-body-size: 14px;
  --gixo-small-size: 12px;
  --gixo-button-height: 40px;
  --gixo-button-height-small: 36px;
  --gixo-record-row-height: 40px;
  --gixo-record-gap: var(--gixo-space-2);
  --gixo-document-width: 74ch;
  --gixo-canvas-padding: var(--gixo-space-2);
  --gixo-analysis-gap: var(--gixo-space-4);
  --mud-typography-h1-family: var(--gixo-editorial-display);
  --mud-typography-h2-family: var(--gixo-editorial-display);
  --mud-typography-h3-family: var(--gixo-editorial-display);
  --mud-typography-h4-family: var(--gixo-editorial-display);
  --mud-typography-h5-family: var(--gixo-editorial-display);
  --mud-typography-h6-family: var(--gixo-editorial-display);
}

/* A consistent hierarchy across Quill, Lumen, Arc, Business, Lex, Folio,
   Prism, Stanza and neutral app pages. Raw generated-artifact headings remain
   untouched; standalone operational layouts are safe to style because preview
   and presentation routes are deliberately not wrapped in .gixo-app-surface. */
.gixo-app-surface :where(
  .mud-typography-h1,
  .mud-typography-h2,
  .mud-typography-h3,
  .mud-typography-h4,
  .mud-typography-h5,
  .mud-typography-h6
),
.gixo-standalone-app-surface :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--gixo-editorial-display);
  text-wrap: balance;
}

.gixo-app-surface :where(
  .mud-typography-h1,
  .mud-typography-h2,
  .mud-typography-h3,
  .mud-typography-h4
),
.gixo-standalone-app-surface :where(h1, h2, h3, h4),
.gixo-app-surface .gxds-hero__title {
  font-weight: 600;
  letter-spacing: -.01em;
}

.gixo-app-surface .mud-typography-h1,
.gixo-app-surface .gxds-hero__title,
.gixo-standalone-app-surface :where(h1) {
  font-size: var(--gixo-heading-1);
  line-height: 32px;
}

.gixo-app-surface .mud-typography-h2,
.gixo-standalone-app-surface :where(h2) {
  font-size: var(--gixo-heading-2);
  line-height: 30px;
}

.gixo-app-surface .mud-typography-h3,
.gixo-standalone-app-surface :where(h3) {
  font-size: var(--gixo-heading-3);
  line-height: 28px;
}

.gixo-app-surface .mud-typography-h4,
.gixo-standalone-app-surface :where(h4) {
  font-size: var(--gixo-heading-4);
  line-height: 24px;
}

.gixo-app-surface :where(.mud-typography-h5, .mud-typography-h6),
.gixo-standalone-app-surface :where(h5, h6) {
  font-weight: 720;
  letter-spacing: -.025em;
  line-height: 1.12;
}

.gixo-app-surface :where(
  .mud-typography-subtitle1,
  .mud-typography-body1
) {
  font-size: var(--gixo-body-size);
  line-height: 20px;
  text-wrap: pretty;
}

/* App chrome and navigation retain the same palette while gaining a calmer,
   more deliberate density. */




.gixo-app-surface .gixo-appbar :where(
  .mud-button-root,
  .mud-icon-button,
  .product-switcher-chip
) {
  min-height: 36px;
}

.gixo-app-surface .gixo-drawer .mud-nav-link {
  min-height: 46px;
  margin-block: 3px;
  border-radius: var(--gixo-editorial-radius-sm);
  font-weight: 650;
}

/* Every MainLayout route receives the same wide, generous page frame. Immersive
   workspaces keep their full-bleed canvas, but their UI controls still receive
   the component treatment below. */
.gixo-app-surface .gixo-main-content:not(.gixo-main-content-immersive) > .mud-container,
.gixo-standalone-app-surface > .mud-container {
  width: 100%;
  max-width: 1520px;
  padding-inline: var(--gixo-editorial-page-gutter);
  padding-bottom: clamp(3rem, 7vw, 6.5rem);
}

/* The breadcrumb brings its own space, so it takes none here. MudBlazor draws it as <nav><ol class="mud-breadcrumbs">:
   the first child is the nav, which a test for the class alone never matched, so every page with a breadcrumb
   carried this margin above it as well (114px for one line of text at 1280px, measured 2026-11-30) and jumped down
   by it when the signed-in surface arrived after the first paint. Both tests sit in one :not() so the rule
   weighs what it did before. */
.gixo-app-surface .gixo-main-content:not(.gixo-main-content-immersive)
  > .mud-container > :first-child:not(.mud-alert):not(.mud-breadcrumbs, :has(> .mud-breadcrumbs)) {
  margin-top: clamp(1.25rem, 3vw, 3rem);
}

/* Shared components: shape, density and spacing only. Existing mode/product
   tokens continue to supply every background, border and text color. */
.gixo-app-surface :where(.mud-card, .mud-tabs, .mud-table-container),
body:has(.gixo-app-surface) .mud-dialog {
  border-radius: var(--gixo-editorial-radius-md);
  overflow: clip;
}

/* A table wider than its box scrolls sideways inside it, as MudBlazor's own container does. The clip above took
   that away from every table on a signed-in page, so on a phone the right-hand columns could not be reached
   (measured at 375px on 2026-11-30: the status label beside the email on Settings > Profile, the Lumen chart
   data grid from three series up, the staff Payment checks buttons). The corners stay rounded: the other axis
   is still clipped. Same weight as the rule above, so it has to stay after it. */
.gixo-app-surface :where(.mud-table-container) {
  overflow-x: auto;
}

.gixo-app-surface :where(
  .mud-paper.gixo-surface,
  .mud-paper.panel-card,
  .mud-paper.form-section,
  .dashboard-grid-toolbar,
  .roadmap-widget
) {
  border-radius: var(--gixo-editorial-radius-md);
}

.gixo-app-surface .mud-card-content {
  padding: clamp(1.25rem, 2.2vw, 2rem);
}

/* A MudSwitch thumb is a .mud-button-root too; at 44px it sat below its track (UI review PRI-U16).
   Each var() carries the token's own value as its fallback because the second selector reaches dialogs,
   and MudDialogProvider renders them outside .gixo-app-surface, where none of its tokens exist. Without
   the fallbacks every dialog button computed to no side padding, no minimum height and square corners:
   the three choices of a message box ran together as one word ("Stay HereStart New BookView Book",
   2026-11-22 to 12-01). AppDesignRulesSourceTests keeps each fallback equal to its token. */
.gixo-app-surface :where(.mud-button-root:not(.mud-switch-base), button:not(.mud-icon-button)),
body:has(.gixo-app-surface) .mud-dialog .mud-button-root:not(.mud-switch-base) {
  min-height: var(--gixo-button-height, 40px);
  padding-inline: var(--gixo-space-4, 16px);
  border-radius: var(--gixo-editorial-radius-sm, 6px);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

/* One quiet resting treatment also wins over Mud's stock hover elevation. */
.gixo-app-surface .mud-button-filled {
  box-shadow: none;
}

.gixo-app-surface :where(.mud-icon-button, .mud-fab) {
  border-radius: var(--gixo-editorial-radius-sm);
}

.gixo-app-surface :where(
  .mud-input-control,
  .mud-input-root,
  .mud-select,
  .mud-picker-input-button
) {
  border-radius: var(--gixo-editorial-radius-sm);
}

/* 48px is the whole field. Mud sizes a field's root with content-box (`.mud-input > input.mud-input-root`: two
   classes and an element), which outweighed the two-class rule that stood here. The box-sizing below was dropped,
   48px became the text area alone and the padding went on top of it: 70px for a standard outlined field, 54px
   for a compact one (measured 2026-11-30). Three classes outweigh Mud; :where() keeps this rule lighter than the
   compact-field rule below, which still has to set 40px. A filled field keeps Mud's own 57px: its padding alone
   is 37px, more than a 48px border-box leaves room for. */
.gixo-app-surface .mud-input > .mud-input-root:where(:not(.mud-input-root-filled)) {
  min-height: 48px;
  box-sizing: border-box;
}

/* Mud rests an outlined label 20px down, the middle of its own 56px field; 15px is the middle of 48px. A
   multi-line field keeps Mud's offset, which lines the label up with its first line. This stays lighter than
   Mud's floated-label rule, so a field with a value or the focus still lifts its label. */
.gixo-app-surface :where(.mud-input:not(:has(> textarea))) ~ .mud-input-label-outlined:not(.mud-input-label-margin-dense) {
  transform: translate(14px, 15px) scale(1);
}

.gixo-app-surface .mud-input-outlined > .mud-input-root-outlined:not(textarea) {
  padding-block: 11px;
}

.gixo-app-surface .mud-input-outlined > .mud-input-root-margin-dense:not(textarea) {
  min-height: var(--gixo-button-height, 40px);
  padding-block: 7px;
}

/* A select's value is a div, which does not centre its one line the way an input does, so the value sat at the
   top of the field (14px above the middle of the old 70px box). Flex centring stood here and never applied: Mud
   writes display:inline into the div's own style attribute. align-content centres the line in a block, whatever
   the field's padding. */
.gixo-app-surface .mud-select .mud-input > .mud-input-root {
  align-content: center;
}

.gixo-app-surface :where(.mud-chip-root, .mud-badge-root) {
  font-weight: 680;
}

.gixo-app-surface .mud-tabs-tabbar {
  min-height: 52px;
}

.gixo-app-surface .mud-tab {
  min-height: 48px;
  font-weight: 680;
  text-transform: none;
}

.gixo-app-surface .mud-table-cell {
  padding-block: .9rem;
}

/* App-native raw fields are used by Lumen and Stanza workspaces. Generated
   outputs are outside this wrapper, so these rules cannot restyle their forms. */
.gixo-standalone-app-surface :where(
  input:not([type="radio"]):not([type="checkbox"]),
  textarea,
  select
) {
  min-height: 48px;
  border-radius: var(--gixo-editorial-radius-sm);
}

/* Plain route titles used by libraries, settings, teams, jobs and utilities. */
.gixo-app-surface .gixo-main-content:not(.gixo-main-content-immersive) :where(
  .mud-container,
  .gixo-settings-main
) > :where(.mud-typography-h1, .mud-typography-h2, .mud-typography-h3, .mud-typography-h4):first-child {
  max-width: 16ch;
  margin-top: clamp(1.25rem, 3vw, 3rem);
  margin-bottom: 1rem !important;
}

/* Existing create-flow banners become composed editorial introductions. This
   applies to the shared Quill, Arc, Lex and Prism creation patterns. */
.gixo-app-surface .gixo-main-content:not(.gixo-main-content-immersive)
  .mud-container > :where(.gixo-gradient-primary, .proposal-header-banner):first-child {
  display: flex;
  min-height: clamp(15rem, 28vw, 23rem);
  align-items: flex-end;
  margin-bottom: clamp(1.75rem, 4vw, 3.5rem) !important;
  padding: clamp(1.5rem, 4vw, 3.75rem) !important;
  border-radius: var(--gixo-editorial-radius-lg);
}

.gixo-app-surface .gixo-main-content:not(.gixo-main-content-immersive)
  .mud-container > :where(.gixo-gradient-primary, .proposal-header-banner):first-child
  :where(.mud-typography-h3, .mud-typography-h4) {
  max-width: 15ch;
  font-size: var(--gixo-heading-1);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 32px;
}

.gixo-app-surface .gixo-main-content:not(.gixo-main-content-immersive)
  .mud-container > :where(.gixo-gradient-primary, .proposal-header-banner):first-child
  .mud-typography-subtitle1 {
  max-width: 58ch;
  margin-top: .9rem;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
}

/* Common dashboard: the greeting used to be raised here into a "large editorial moment" (up to 6.8rem over two
   lines, the first product starting at y=479 on a 900px screen). The home leads with the reader's work now and the
   greeting keeps the base .gxds-hero__title size (UI review PLA-U1, 2026-10-20). */

/* Business uses a composed hero card instead of the shared banner. */
.gixo-app-surface .consultant-shell .hero-card {
  min-height: clamp(17rem, 31vw, 26rem);
  display: flex;
  align-items: flex-end;
  border-radius: var(--gixo-editorial-radius-lg);
}

.gixo-app-surface .consultant-shell .hero-copy > .mud-typography-h3 {
  max-width: 16ch;
  font-size: var(--gixo-heading-1);
  font-weight: 600;
  line-height: 32px;
}

/* Lumen's quick creator is already structurally bespoke; bring its proportions
   into the shared system without changing any Lumen mode or workflow choices. */
.gixo-app-surface .deck-quick-container {
  padding: clamp(1rem, 4vw, 4rem);
}

.gixo-app-surface .deck-quick-card {
  border-radius: var(--gixo-editorial-radius-lg);
}

.gixo-app-surface .deck-title {
  max-width: 14ch;
  margin-inline: auto;
  font-family: var(--gixo-editorial-display);
  font-size: var(--gixo-heading-1);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 32px;
  text-wrap: balance;
}

.gixo-app-surface .deck-input-wrapper:has(.deck-voice-wrapper) .deck-topic-input {
  padding-right: 6rem;
}

.gixo-app-surface .deck-voice-wrapper .gixo-voice-recorder,
.gixo-app-surface .deck-voice-wrapper .gixo-voice-recorder:hover {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.gixo-app-surface .deck-voice-wrapper .gixo-recorder-title {
  display: none;
}

.gixo-app-surface .deck-voice-wrapper .gixo-record-btn {
  min-width: 4.5rem;
  min-height: 42px;
  padding-inline: .75rem;
}

/* Folio's wizard title sits inside the full wizard wrapper. */
.gixo-app-surface .gixo-studio .studio-gradient-primary > .mud-typography-h4:first-child {
  max-width: 13ch;
  margin-block: clamp(1rem, 3vw, 2.5rem) clamp(2rem, 5vw, 4rem) !important;
  font-size: var(--gixo-heading-1);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 32px;
}

/* Stanza uses a bare operational layout. The product's own CSS still owns
   palette and fields; this only aligns its editorial rhythm with the app. */
.gixo-app-surface .stanza-create {
  gap: var(--gixo-editorial-section-space);
}

.gixo-app-surface .stanza-create__intro h1 {
  font-size: var(--gixo-heading-1);
}

@media (min-width: 960.02px) {
  .gixo-app-surface .stanza-create {
    align-items: start;
  }

  .gixo-app-surface .stanza-create__intro {
    position: sticky;
    top: clamp(7rem, 18vh, 12rem);
  }
}

@media (min-width: 960.02px) and (max-width: 1399.98px) {
  .gixo-app-surface .stanza-create {
    grid-template-columns: minmax(0, 1fr) minmax(28rem, 34rem);
    gap: var(--gixo-editorial-section-space);
    padding-inline: clamp(2rem, 5vw, 4rem);
  }

  .gixo-app-surface .stanza-create__intro h1 {
    max-width: 11ch;
    font-size: var(--gixo-heading-1);
  }
}

@media (max-width: 959.98px) {
  .gixo-app-surface {
    --gixo-editorial-page-gutter: var(--gixo-space-4);
  }

  .gixo-app-surface .consultant-shell .hero-card {
    min-height: auto;
  }
}

@media (max-width: 599.98px) {


  .gixo-app-surface :where(
    .mud-typography-h1,
    .mud-typography-h2,
    .mud-typography-h3,
    .mud-typography-h4
  ),
  .gixo-standalone-app-surface :where(h1, h2, h3, h4) {
    overflow-wrap: anywhere;
  }



  .gixo-app-surface .gixo-main-content:not(.gixo-main-content-immersive)
    .mud-container > :where(.gixo-gradient-primary, .proposal-header-banner):first-child {
    min-height: 13rem;
    padding: 1.35rem !important;
  }

  .gixo-app-surface .mud-card-content {
    padding: 1.1rem;
  }
}

.gixo-app-surface .gixo-appbar :where(.mud-button-root, .mud-icon-button, .product-switcher-chip) {
  min-height: 36px;
}

.gixo-app-surface :where(.mud-typography-body2, .mud-typography-caption) {
  font-size: var(--gixo-small-size);
  line-height: 18px;
}
.gixo-app-surface :where(.mud-button-size-small:not(.mud-switch-base)) {
  min-height: var(--gixo-button-height-small);
}

/* ============================================================================
   APP PHASE 1 — UNTITLED UI / SHADCN RHEA APPLICATION SHELL SYSTEM
   Applies uniformly to EVERY authenticated product and neutral surface
   via .gixo-app-surface without altering --product-headline-font.
   ============================================================================ */

/* Calm Linear-style desktop workspace quick-nav in AppBar */
.gixo-appbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: var(--gixo-space-3, 12px);
  padding-inline-start: var(--gixo-space-3, 12px);
  border-inline-start: 1px solid var(--gixo-divider);
  min-width: 0;
}

.gixo-appbar-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--gixo-radius-sm, 6px);
  color: var(--gixo-text-secondary);
  font-size: var(--gixo-body-size, 14px);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

.gixo-appbar-nav__link:hover {
  background: var(--gixo-surface-tonal);
  color: var(--gixo-text-primary);
}

.gixo-appbar-nav__link[aria-current="page"] {
  background: color-mix(in srgb, var(--gixo-primary) 12%, transparent);
  color: var(--gixo-primary);
  font-weight: 600;
}

.gixo-appbar-nav__link:focus-visible {
  outline: 2px solid var(--gixo-primary);
  outline-offset: 2px;
}

/* Crisp Untitled UI controls in AppBar */
.gixo-app-surface .gixo-appbar .product-switcher-chip {
  border-radius: var(--gixo-radius, 8px);
  padding: 4px 10px;
  font-weight: 600;
  font-size: var(--gixo-body-size, 14px);
}

.gixo-app-surface .gixo-appbar [data-testid="appbar-search"] {
  border-radius: var(--gixo-radius, 8px);
  border-color: var(--gixo-border);
  background: var(--gixo-surface);
  color: var(--gixo-text-secondary);
  font-weight: 500;
}

/* Unified table, list & data-grid density (shadcn Rhea 40px rows) */
.gixo-app-surface .mud-table {
  background: var(--gixo-card);
  border: 1px solid var(--gixo-border);
  border-radius: var(--gixo-radius-md, 12px);
  box-shadow: var(--gixo-shadow-sm);
  overflow: hidden;
}

.gixo-app-surface .mud-table .mud-table-head .mud-table-cell {
  background: var(--gixo-surface-tonal);
  color: var(--gixo-text-muted);
  font-size: var(--gixo-small-size, 12px);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--gixo-divider);
  padding-block: var(--gixo-space-2, 8px);
}

.gixo-app-surface .mud-table .mud-table-body .mud-table-row {
  min-height: var(--gixo-record-row-height, 40px);
}

.gixo-app-surface .mud-table .mud-table-body .mud-table-cell {
  font-size: var(--gixo-body-size, 14px);
  border-bottom: 1px solid var(--gixo-divider);
  font-variant-numeric: tabular-nums;
}

/* Unified dialogs, popovers & outlined inputs */
.gixo-app-surface .mud-input-outlined-border {
  border-radius: var(--gixo-radius, 8px);
}

.mud-dialog {
  border-radius: var(--gixo-radius-md, 12px);
  border: 1px solid var(--gixo-border);
}

/* Harmonized product dashboard shell cards & buttons */
.gixo-app-surface .brand-dashboard__hero {
  border-radius: var(--gixo-radius-md, 12px);
  border: 1px solid var(--gixo-border);
}

.gixo-app-surface .brand-dashboard__menu-button {
  min-height: var(--gixo-button-height-small, 36px);
  border-radius: var(--gixo-radius, 8px);
  font-size: var(--gixo-body-size, 14px);
  font-weight: 500;
}

.gixo-app-surface :where(.brand-card, .metric-tile) {
  border-radius: var(--gixo-radius-md, 12px);
  border: 1px solid var(--gixo-border);
  box-shadow: var(--gixo-shadow-sm);
}

@media (max-width: 1120px) {
  .gixo-appbar-nav {
    display: none !important;
  }
}
