/* Indexed glass material, single source of truth (polish pass 2026-10-27).
   Loaded AFTER portal-consolidated-shell.css and the inline auth CSS. Light mode only: the portal has no dark theme.
   Model: three optical layers per surface
     1. body  : tinted frosted fill + fine grain (kills banding, adds tooth)
     2. edge  : inset specular highlight on top/left, cool shade on bottom/right, hairline rim
     3. lift  : contact + ambient + far shadow (tinted, never grey-black)
   Concentric radii: inner radius = outer radius - padding. Animated properties: transform/opacity only. */

html.indexed-consolidated, body.portal-design {
  --ixg-ink: 32, 52, 73;
  --ixg-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  --ixg-fill: radial-gradient(130% 90% at 10% -10%, rgba(255,255,255,.58), transparent 58%), linear-gradient(158deg, rgba(255,255,255,.58), rgba(255,255,255,.34) 52%, rgba(246,250,255,.46));
  --ixg-fill-float: radial-gradient(120% 100% at 14% -20%, rgba(255,255,255,.7), transparent 60%), linear-gradient(170deg, rgba(255,255,255,.74), rgba(243,248,255,.56));
  --ixg-fill-inner: linear-gradient(160deg, rgba(255,255,255,.5), rgba(255,255,255,.28));
  --ixg-fill-read: radial-gradient(130% 90% at 10% -10%, rgba(255,255,255,.7), transparent 58%), linear-gradient(158deg, rgba(255,255,255,.66), rgba(248,251,255,.5));
  --ixg-rim: rgba(255,255,255,.62);
  --ixg-spec: inset 0 1px 0 rgba(255,255,255,.95), inset 1px 0 0 rgba(255,255,255,.55), inset -1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(96,128,170,.2), inset 0 -22px 30px -26px rgba(255,255,255,.7);
  --ixg-lift: 0 1px 1px rgba(var(--ixg-ink),.05), 0 12px 24px -16px rgba(48,80,140,.32);
  --ixg-spec-lite: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(96,128,170,.2);
  --ixg-lift-float: 0 1px 1px rgba(var(--ixg-ink),.06), 0 10px 20px -10px rgba(var(--ixg-ink),.24), 0 30px 60px -28px rgba(34,62,130,.42);
  --ixg-blur: blur(16px) saturate(1.4);
  --ixg-blur-float: blur(20px) saturate(1.5);
  --ixg-press: cubic-bezier(.3,.7,.2,1);
}

/* 1. Resting cards */
html.indexed-consolidated:not(#x) :is(.ix-business-card,.pt-card,.panel,.card,.summary-card,.dw-decision,.dw-recap,.dw-team-card,.dw-idea-grid article,.dw-signals article,.in-panel,.ops-stat,.ops-tile,.scr-list,.information-panel,.tablewrap,.empty-state,.empty,.ix-owner-utilities,.ix-workspace-identity,.workspace-identity,.ts-team,.head-card:not(.ix-page-heading),.pas-plan) {
  border: 1px solid var(--ixg-rim) !important;
  border-radius: 24px !important;
  background: var(--ixg-fill) !important;
  box-shadow: var(--ixg-spec-lite), var(--ixg-lift) !important;
  /* perf: no backdrop-filter on resting cards (they fill scrolling lists); the fill is frosted enough */
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* reading surfaces: more frost so body copy never fights the wash behind */
html.indexed-consolidated:not(#x) :is(.dw-decision,.dw-recap,.in-panel,.information-panel,.tablewrap,.ix-business-card) {
  background: var(--ixg-fill-read) !important;
}
/* Other surfaces that the shell blurs (owner, customer, team-person, brand, website section cards, Found-by-AI hero, studio stage,
   Rumi quick chips, and the nav nested inside the dock whose own blur only ever saw its parent): keep their own fill and radius,
   only drop the per-element backdrop blur that repaints while scrolling. */
html.indexed-consolidated:not(#x) :is(.dw-found,.owner-summary-grid>.panel,.owner-inner,.calm-chart,.cust-list,.cust-card,.team-real-person,.dg-brand-card,.ca-owner-metrics>.acq-metric,.ix-website-sections>:is(.ix-website-intro,.pas-recorded-proposals,.pas-rumi-edits,.pas-publishing),.ix-studio-stage,.rc-quick button,.gi-sidebar .ix-menu-card) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* nested cards sit on their parent: inner radius = 24 - 10, no second blur, flatter lift */
html.indexed-consolidated:not(#x) :is(.panel,.card,.in-panel,.ix-business-card,.pt-card,.dw-decision) :is(.panel,.card,.summary-card,.pt-card,.ops-stat,.dw-signals article,.dw-idea-grid article) {
  border-radius: 14px !important;
  background: var(--ixg-fill-inner) !important;
  background-blend-mode: normal !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(96,128,170,.12), 0 6px 14px -12px rgba(var(--ixg-ink),.2) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 2. Floating chrome: header pill, dock, account button, Rumi launcher */
html.indexed-consolidated:not(#x) .ix-unified-switcher {
  border: 1px solid var(--ixg-rim) !important;
  border-radius: 32px !important;
  background: var(--ixg-grain), var(--ixg-fill-float) !important;
  background-blend-mode: soft-light, normal !important;
  box-shadow: var(--ixg-spec), var(--ixg-lift-float) !important;
  -webkit-backdrop-filter: var(--ixg-blur-float) !important;
  backdrop-filter: var(--ixg-blur-float) !important;
}
html.indexed-consolidated:not(#x) .ix-unified-switcher a { border-radius: 27px !important; }
html.indexed-consolidated:not(#x) .ix-glass-lens {
  border-radius: 27px !important;
  background: radial-gradient(90% 80% at 30% 0%, rgba(255,255,255,.95), rgba(255,255,255,.36) 70%), rgba(255,255,255,.3) !important;
  border: 1px solid rgba(255,255,255,.9) !important;
  box-shadow: inset 0 1px 0 #fff, inset 0 -6px 10px -6px rgba(60,100,170,.2), 0 1px 1px rgba(var(--ixg-ink),.06), 0 8px 16px -8px rgba(34,62,130,.4) !important;
}
html.indexed-consolidated:not(#x) .ix-mobile-account,
html.indexed-consolidated:not(#x) #gi-rumi-toggle {
  border: 1px solid var(--ixg-rim) !important;
  background: var(--ixg-grain), linear-gradient(170deg, rgba(255,255,255,.88), rgba(243,248,255,.8)) !important;
  background-blend-mode: soft-light, normal !important;
  box-shadow: var(--ixg-spec), var(--ixg-lift-float) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Header band: no hard rule across the page. A feathered veil plus a blur layer that fades out, so scrolled content
   dissolves under the title instead of being cut by a line. The blur lives on a pseudo so the pill is not masked. */
html.indexed-consolidated:not(#x) :is(.ix-portal-header,.topbar) {
  border: 0 !important;
  box-shadow: none !important;
  background: linear-gradient(180deg, rgba(236,243,250,.62), rgba(236,243,250,.28) 62%, rgba(236,243,250,0)) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* perf: the feathered veil above is enough; the masked blur layer was removed (mask + backdrop-filter repaints on every scroll frame). */

@media (max-width: 760px) {
  /* Dock: floating, opaque enough that labels behind never read through, concentric with its items. */
  html.indexed-consolidated:not(#x) :is(.gi-sidebar,.app>.sidebar,body>.sidebar) {
    border: 1px solid var(--ixg-rim) !important;
    border-radius: 38px !important;
    background: var(--ixg-grain), radial-gradient(120% 100% at 14% -30%, rgba(255,255,255,.88), transparent 62%), linear-gradient(180deg, rgba(255,255,255,.95), rgba(238,245,252,.9)) !important;
    background-blend-mode: soft-light, normal, normal !important;
    box-shadow: var(--ixg-spec), var(--ixg-lift-float) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
    backdrop-filter: blur(20px) saturate(1.5) !important;
  }
  html.indexed-consolidated:not(#x) .ix-menu-card :is(a,button) { border-radius: 30px !important; }
  html.indexed-consolidated:not(#x) .ix-menu-card :is(a,button):is(.active,[aria-current=page]) {
    background: radial-gradient(90% 90% at 30% 0%, rgba(255,255,255,.95), rgba(255,255,255,.42) 72%), rgba(255,255,255,.3) !important;
    border: 1px solid rgba(255,255,255,.95) !important;
    box-shadow: inset 0 1px 0 #fff, inset 0 -8px 12px -8px rgba(60,100,170,.22), 0 1px 1px rgba(var(--ixg-ink),.06), 0 8px 16px -8px rgba(34,62,130,.34) !important;
  }
}

/* 3. Sheets and dialogs */
html.indexed-consolidated:not(#x) :is(#gi-rumi-panel,dialog.ts-review,.ix-user-dialog,.nav-more-panel,.ix-tour-card) {
  border: 1px solid rgba(255,255,255,.8) !important;
  background: var(--ixg-grain), radial-gradient(120% 70% at 10% -10%, rgba(255,255,255,.9), transparent 60%), linear-gradient(170deg, rgba(250,253,255,.9), rgba(238,245,255,.84)) !important;
  background-blend-mode: soft-light, normal, normal !important;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(96,128,170,.18), 0 2px 4px rgba(var(--ixg-ink),.06), 0 24px 48px -16px rgba(var(--ixg-ink),.32), 0 60px 110px -40px rgba(34,62,130,.5) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
  backdrop-filter: blur(20px) saturate(1.5) !important;
}
html.indexed-consolidated .ix-user-dialog::backdrop {
  background: radial-gradient(120% 90% at 50% 100%, rgba(26,46,92,.42), rgba(26,46,92,.22));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

/* Rumi composer well: no flat slab, the sheet material continues behind the pill */
html.indexed-consolidated:not(#x) #gi-rumi-panel .rc-compose-wrap { background: linear-gradient(180deg, rgba(246,250,255,0), rgba(240,246,255,.85) 40%) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.indexed-consolidated:not(#x) #gi-rumi-panel .rc-compose { border: 1px solid rgba(255,255,255,.9) !important; box-shadow: var(--ixg-spec), 0 10px 24px -14px rgba(var(--ixg-ink),.3) !important; }

/* 4. Buttons, chips, inputs */
/* Secondary: light glass fill. The shell keeps its dark-blue label (#34558d / #1740a9) on these, so fill and text always pair. */
html.indexed-consolidated:not(#x) :is(.pt-btn.ghost,.dw-button:not(.primary),.ix-dialog-back,.rc-quick button,.rc-chip,.chip,.pill) {
  border: 1px solid rgba(255,255,255,.78) !important;
  background: var(--ixg-fill-inner) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(96,128,170,.16), 0 1px 1px rgba(var(--ixg-ink),.05), 0 8px 14px -10px rgba(var(--ixg-ink),.28) !important;
}
/* Primary: blue glass fill AND an explicit white label so the pair can never invert. This list mirrors the shell's own blue
   buttons, including the action rows where the shell makes every .dw-button/.pt-link blue with white text; it is last and one
   element-type more specific than the secondary rule above so it wins inside those rows. */
html.indexed-consolidated:not(#x) :is(.pt-btn:not(.ghost),.dw-button.primary,button.primary,.btn-primary),
html.indexed-consolidated:not(#x) :is(.dw-activity-actions,.dw-idea-grid,.pt-site-actions,.ts-review) :is(.dw-button,.pt-link):is(a,button) {
  background: linear-gradient(180deg, #2a55c4, #1740a9) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 4px rgba(8,24,80,.28), 0 1px 1px rgba(8,24,80,.2), 0 10px 18px -10px rgba(23,64,169,.75) !important;
}
html.indexed-consolidated:not(#x) :is(input:not([type=checkbox],[type=radio],[type=range]),textarea,select) {
  border: 1px solid rgba(255,255,255,.8) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.62)) !important;
  box-shadow: inset 0 1px 2px rgba(var(--ixg-ink),.1), inset 0 -1px 0 rgba(255,255,255,.9) !important;
}
/* Focus: the shell's solid 2px outlines (portal-consolidated-shell.css, auth popup) stay in force. The glass pass must not remove or soften them (WCAG 2.4.7, 1.4.11). */

/* 5. Pressed states: transform only (compositor), no layout, no shadow animation */
html.indexed-consolidated :is(.ix-menu-card a,.ix-menu-card button,.pt-btn,.dw-button,.ix-mobile-account,#gi-rumi-toggle,.rc-quick button,.ix-unified-switcher a,.ix-dialog-back) {
  transition: background .18s, box-shadow .18s, transform .18s var(--ixg-press);
  -webkit-tap-highlight-color: transparent;
}
html.indexed-consolidated :is(.ix-menu-card a,.ix-menu-card button,.pt-btn,.dw-button,.ix-mobile-account,#gi-rumi-toggle,.rc-quick button,.ix-unified-switcher a,.ix-dialog-back):active {
  transform: scale(.955); transition-duration: .08s;
}

/* 6. (removed for perf) The fixed full-screen soft-light grain overlay forced a blend over the whole viewport every frame; grain stays on the floating surfaces only. */

/* 7. Sign-in / sign-out */
body.portal-design .login-shell { background:
  radial-gradient(70% 50% at 50% 108%, rgba(14,40,128,.55), transparent 70%),
  radial-gradient(60% 40% at 8% 4%, rgba(255,255,255,.28), transparent 70%); }
body.portal-design .login-shell > .signin-asterisk {
  background:
    radial-gradient(60% 45% at 30% 14%, rgba(255,255,255,.95), transparent 70%),
    linear-gradient(142deg, rgba(255,255,255,.86), rgba(232,240,255,.34) 36%, rgba(255,255,255,.08) 58%, rgba(255,255,255,.62)) !important;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.75)) drop-shadow(0 28px 36px rgba(14,40,128,.3)) drop-shadow(0 4px 8px rgba(14,40,128,.14)) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  opacity: .92;
}
body.portal-design .login-wrap {
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 32px;
  background: var(--ixg-grain), radial-gradient(120% 70% at 10% -10%, rgba(255,255,255,.55), transparent 60%), linear-gradient(160deg, rgba(255,255,255,.4), rgba(255,255,255,.16));
  background-blend-mode: soft-light, normal, normal;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 1px 0 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(255,255,255,.18), inset 0 -26px 40px -32px rgba(255,255,255,.55), 0 2px 4px rgba(24,40,110,.1), 0 30px 60px -22px rgba(24,40,110,.5), 0 70px 120px -50px rgba(14,40,128,.55);
  -webkit-backdrop-filter: blur(34px) saturate(1.6); backdrop-filter: blur(34px) saturate(1.6);
}
body.portal-design .login-wrap .form-input {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.85);
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.56));
  box-shadow: inset 0 1px 3px rgba(24,40,110,.16), inset 0 -1px 0 rgba(255,255,255,.8);
}
body.portal-design .login-wrap .form-input:focus-visible { box-shadow: inset 0 1px 3px rgba(24,40,110,.12), 0 0 0 2px rgba(255,255,255,.95), 0 0 0 4px rgba(23,64,169,.7), 0 10px 24px -10px rgba(23,64,169,.6); }
body.portal-design .login-wrap .btn { transition: background .18s, box-shadow .18s, border-color .18s, transform .18s var(--ixg-press); }
body.portal-design .login-wrap .btn:active { transform: scale(.97); }
body.portal-design .login-wrap .btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 4px rgba(8,24,80,.3), 0 12px 22px -10px rgba(10,30,110,.8); }

/* 8. Fallbacks: no backdrop-filter, reduced transparency, increased contrast, reduced motion */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.indexed-consolidated {
    --ixg-fill: linear-gradient(160deg, #f1f6fc, #e6eef8);
    --ixg-fill-float: linear-gradient(170deg, #f7faff, #e9f1fa);
    --ixg-fill-inner: linear-gradient(160deg, #f5f9fe, #ebf2fa);
    --ixg-fill-read: linear-gradient(160deg, #f6f9fd, #edf3fa);
  }
  html.indexed-consolidated:not(#x) :is(#gi-rumi-panel,dialog.ts-review,.ix-user-dialog,.nav-more-panel,.ix-tour-card,.gi-sidebar) { background: #f4f8fd !important; }
  body.portal-design .login-wrap { background: rgba(244,248,255,.9); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html.indexed-consolidated {
    --ixg-fill: linear-gradient(160deg, #f4f8fd, #eaf1f9);
    --ixg-fill-float: linear-gradient(170deg, #f8fbff, #edf3fa);
    --ixg-fill-inner: #f4f8fd;
    --ixg-fill-read: #f6f9fd;
    --ixg-rim: rgba(32,52,73,.35);
  }
  html.indexed-consolidated:not(#x) :is(.ix-business-card,.pt-card,.panel,.card,.summary-card,.dw-decision,.dw-recap,.in-panel,.information-panel,.tablewrap,.ts-team,.head-card:not(.ix-page-heading),.pas-plan,.ix-unified-switcher,.gi-sidebar,#gi-rumi-panel,dialog.ts-review,.ix-user-dialog,.ix-tour-card,.nav-more-panel,.ix-mobile-account,#gi-rumi-toggle) {
    background: #f6f9fd !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    border-color: rgba(32,52,73,.4) !important;
  }
    body.portal-design .login-wrap { background: #f4f8ff; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: rgba(32,52,73,.45); }
  body.portal-design .login-shell > .signin-asterisk { opacity: .55; }
  html.indexed-consolidated .ix-user-dialog::backdrop, html.indexed-consolidated .ts-review::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(26,46,92,.56); }
}
@media (prefers-reduced-motion: reduce) {
  html.indexed-consolidated :is(.ix-menu-card a,.ix-menu-card button,.pt-btn,.dw-button,.ix-mobile-account,#gi-rumi-toggle,.rc-quick button,.ix-unified-switcher a,.ix-dialog-back) { transition: none !important; }
  html.indexed-consolidated :is(.ix-menu-card a,.ix-menu-card button,.pt-btn,.dw-button,.ix-mobile-account,#gi-rumi-toggle,.rc-quick button,.ix-unified-switcher a,.ix-dialog-back):active { transform: none !important; }
  body.portal-design .login-wrap .btn { transition: none !important; }
  body.portal-design .login-wrap .btn:active { transform: none !important; }
  body.portal-design .login-shell > .signin-asterisk { animation: none !important; }
}

/* Rumi updates cards are in-flow content, not floating chrome: no blur (merge of base shell + glass). */
html.indexed-consolidated:not(#x) :is(#rc-updates,#gi-rumi-changes,#gi-rumi-memory){backdrop-filter:none;-webkit-backdrop-filter:none}
