/* IATFusion: Colour Field layout, layered shapes and warm Studio Play accents.
   All artwork is decorative CSS. The original Athena logo is never recoloured. */
html[data-theme="iatfusion"] {
    color-scheme: light;
    --color-background: #faf9f7;
    --color-surface: #ffffff;
    --color-surface-subtle: #f0f5fb;
    --color-surface-elevated: #ffffff;
    --text-primary: #111827;
    --text-secondary: #475569;
    --text-tertiary: #56667b;
    --text-disabled: #687588;
    --border-light: #d9e1eb;
    --border-medium: #a3b2c5;
    --border-dark: #64748b;
    --google-blue: #075eaa;
    --google-blue-light: #0875ce;
    --google-blue-dark: #104b65;
    --google-blue-subtle: #e7f2ff;
    --google-red: #bd2433;
    --google-red-light: #d62f40;
    --google-red-dark: #991b2a;
    --google-red-subtle: #fff0f1;
    --google-yellow: #926000;
    --google-yellow-light: #a56b00;
    --google-yellow-dark: #754b00;
    --google-yellow-subtle: #fff6d9;
    --google-green: #187246;
    --google-green-light: #228251;
    --google-green-dark: #115735;
    --google-green-subtle: #e8f6ee;
    --theme-accent: #075eaa;
    --theme-accent-light: #0875ce;
    --theme-accent-strong: #104b65;
    --theme-accent-subtle: #e7f2ff;
    --theme-on-accent: #ffffff;
    --theme-radius-sm: 10px;
    --theme-radius-md: 16px;
    --theme-radius-lg: 22px;
    --theme-radius-xl: 28px;
    --theme-blur: 0px;
    --theme-saturation: 100%;
    --theme-shadow-sm: 0 4px 16px rgb(25 50 80 / 6%);
    --theme-shadow-md: 0 10px 28px rgb(25 50 80 / 9%);
    --theme-shadow-lg: 0 20px 56px rgb(25 50 80 / 12%);
    --theme-logo-filter: none;
    --theme-logo-shadow: 0 16px 26px rgb(25 50 80 / 13%);
    --theme-page-hero-background: #ffffff;
    --theme-page-hero-before-background: none;
    --theme-nav-active-bg: #104b65;
    --theme-nav-active-text: #ffffff;
    --theme-nav-shadow: 0 3px 12px rgb(16 75 101 / 12%);
    --theme-hero-action-bg: #ffffff;
    --theme-hero-action-hover-bg: #e7f2ff;
    --theme-hero-action-border: #a3b2c5;
    --theme-hero-action-hover-border: #075eaa;
    --theme-hero-action-text: #104b65;
    --theme-hero-action-hover-text: #104b65;
    --theme-hero-action-primary-bg: #075eaa;
    --theme-hero-action-primary-hover-bg: #104b65;
    --theme-hero-action-calendar-bg: #075eaa;
    --theme-hero-action-calendar-hover-bg: #104b65;
    --theme-hero-action-primary-shadow: var(--theme-shadow-sm);
    --theme-hero-action-glass-shadow: var(--theme-shadow-sm);
    --iat-blue: #1682ff;
    --iat-red: #f04c59;
    --iat-yellow: #ffbf24;
    scrollbar-color: #8799b0 #f0f5fb;
    scrollbar-width: thin;
}

/* Decorations stay outside the interaction tree and never create scrollable width. */
.iat-theme-art { display: none; }
html[data-theme="iatfusion"] .iat-theme-art {
    display: block; position: fixed; inset: 0; overflow: hidden;
    pointer-events: none; z-index: 0; contain: strict;
    background: radial-gradient(ellipse at 100% 28%, #eaf3ff 0, transparent 43%);
}
.iat-theme-art i { position: absolute; display: block; }
.iat-theme-art__circle {
    width: clamp(52px, 7vw, 110px); aspect-ratio: 1; top: 19%; left: -2.5%;
    border: 3px solid var(--iat-blue); border-radius: 50%;
}
.iat-theme-art__square {
    width: clamp(40px, 5vw, 76px); aspect-ratio: 1; top: 18%; right: -1.5%;
    background: var(--iat-red); border-radius: 20%; transform: rotate(12deg);
    box-shadow: 0 8px 18px rgb(175 35 50 / 12%);
}
.iat-theme-art__triangle {
    width: clamp(50px, 6vw, 96px); aspect-ratio: 1; bottom: 3%; right: 1%;
    background: var(--iat-yellow); clip-path: polygon(50% 0, 100% 100%, 0 100%);
    transform: rotate(-8deg);
}

html[data-theme="iatfusion"] body::before { content: none !important; }
html[data-theme="iatfusion"] :is(.pill-nav, .pill-nav-sidebar, .pill-nav__dropdown-menu, .notif-menu) {
    background: #fff !important; backdrop-filter: none !important;
    box-shadow: var(--theme-shadow-sm) !important;
}
html[data-theme="iatfusion"] :is(.pill-nav__brand, .pill-nav__brand-text, .pill-nav__item) { color: var(--text-primary); }
html[data-theme="iatfusion"] :is(.pill-nav__item.active, .pill-nav-sidebar__item.active) {
    background: #104b65 !important; color: #fff !important;
}
html[data-theme="iatfusion"] :is(.card, .glass-card, .settings-header, .settings-sidebar, .hero-panel) {
    background: #fff !important; border-color: var(--border-light) !important;
    box-shadow: var(--theme-shadow-sm) !important;
}
html[data-theme="iatfusion"] :is(.btn-primary, button.btn-primary) {
    background: var(--theme-accent) !important; color: #fff !important;
}
html[data-theme="iatfusion"] :is(.btn-primary, button.btn-primary):hover:not(:disabled) { background: #104b65 !important; }
html[data-theme="iatfusion"] :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
    background-color: #fff !important; border-color: var(--border-medium) !important; color: #111827 !important;
}
html[data-theme="iatfusion"] :is(input, textarea)::placeholder { color: #56667b !important; opacity: 1; }
html[data-theme="iatfusion"] :is(button, a, input, select, textarea, summary):focus-visible {
    outline: 3px solid #075eaa !important; outline-offset: 3px;
}
html[data-theme="iatfusion"] :is(button, input, select, textarea):disabled { opacity: .6; cursor: not-allowed; }
html[data-theme="iatfusion"] :is(dialog, [role="dialog"], .modal-content, .pill-nav__dropdown-menu) { color: var(--text-primary); }
html[data-theme="iatfusion"] :is(.support-hub, .support-detail-page) { --support-accent-ink: var(--theme-accent-strong); }

/* The existing home layout and real data remain intact. */
html[data-theme="iatfusion"] .hero-panel { border: 1px solid #d4e1ef !important; background: #fff !important; box-shadow: var(--theme-shadow-sm) !important; border-radius: 28px; padding: clamp(24px, 3vw, 44px); }
html[data-theme="iatfusion"] .hero-panel::before,
html[data-theme="iatfusion"] .hero-panel::after,
html[data-theme="iatfusion"] .home-canvas::before { content: none !important; }
html[data-theme="iatfusion"] :is(.hero-title, .hero-title span) { color: #111827 !important; -webkit-text-fill-color: #111827 !important; background: none !important; }
html[data-theme="iatfusion"] .hero-title { font-size: clamp(38px, 4.1vw, 64px); font-weight: 700; letter-spacing: -.055em; line-height: 1.04; }
html[data-theme="iatfusion"] .hero-subtitle { font-size: 17px; line-height: 1.65; }
html[data-theme="iatfusion"] .hero-stage-layout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: clamp(28px, 4vw, 64px); width: min(calc(100% - 32px), 1340px); transform: translateY(clamp(-72px, -7vh, -40px)); overflow: visible; }
html[data-theme="iatfusion"] .eyebrow::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--iat-blue); box-shadow: 8px 0 var(--iat-red), 16px 0 var(--iat-yellow); margin: 0 16px 0 6px; }
html[data-theme="iatfusion"] .hero-orbit { min-height: 430px; }
html[data-theme="iatfusion"] .athena-hero-stage { inset: 0; }
html[data-theme="iatfusion"] .athena-logo-mount { width: min(85%, 370px); }
html[data-theme="iatfusion"] .hero-orbit::before {
    content: ''; position: absolute; inset: 0; border-radius: 44% 12% 38% 18%;
    background: #e7f2ff; z-index: -2;
}
html[data-theme="iatfusion"] .athena-hero-stage::before {
    content: ''; position: absolute; width: 64%; aspect-ratio: 1; border-radius: 50%;
    border: 3px solid var(--iat-blue); left: 4%; top: 9%; z-index: -1;
}
html[data-theme="iatfusion"] .athena-hero-stage::after {
    content: ''; position: absolute; width: 27%; aspect-ratio: 1; border-radius: 22%;
    background: linear-gradient(135deg, #ff6a72, #e83d4d); right: 5%; top: 6%; transform: rotate(12deg); z-index: -1;
    box-shadow: 0 10px 18px rgb(175 35 50 / 12%);
}
html[data-theme="iatfusion"] .athena-logo-mount::before {
    content: ''; position: absolute; width: 35%; aspect-ratio: 1; bottom: -4%; right: -5%;
    background: linear-gradient(135deg, #ffd665, #ffb800); clip-path: polygon(50% 0, 100% 100%, 0 100%); z-index: -1;
}
html[data-theme="iatfusion"] .athena-logo-static.athena-theme-logo {
    width: 100%; height: 100%; filter: drop-shadow(0 12px 18px rgb(25 50 80 / 15%)) !important;
}
html[data-theme="iatfusion"] .hero-action {
    background: #075eaa !important; color: #fff !important; border-color: #075eaa !important; box-shadow: var(--theme-shadow-sm);
}
html[data-theme="iatfusion"] .hero-action :is(strong, span, i) { color: #fff !important; }
html[data-theme="iatfusion"] .hero-action strong { font-size: 15px; font-weight: 650; }
html[data-theme="iatfusion"] .hero-action span { font-size: 12px; font-weight: 400; }
html[data-theme="iatfusion"] .hero-action:hover { background: #104b65 !important; transform: translateY(-2px); }

/* Solid conversation surfaces and visible selection, shared with the quick-reply widget. */
html[data-theme="iatfusion"] .messaging-page .msg-chat {
    background: #fff; border: 1px solid var(--border-light); border-radius: 24px; padding: 20px;
    box-shadow: var(--theme-shadow-sm);
}
html[data-theme="iatfusion"] .messaging-page .msg-inbox { background: #faf9f7; border-radius: 22px; }
html[data-theme="iatfusion"] .messaging-page .msg-conversation { background: #fff !important; border: 1px solid #e1e7ef !important; }
html[data-theme="iatfusion"] .messaging-page .msg-conversation:is(.is-selected, :hover) {
    background: #e7f2ff !important; border-color: #aacdf4 !important; border-left: 3px solid #075eaa !important;
}
html[data-theme="iatfusion"] :is(.messaging-page, .msg-widget) .msg-bubble { background: #f1f4f8 !important; color: #111827; }
html[data-theme="iatfusion"] :is(.messaging-page, .msg-widget) .msg-row.is-mine .msg-bubble { background: #dcecff !important; color: var(--text-primary); }
html[data-theme="iatfusion"] :is(.messaging-page, .msg-widget) .msg-attachment { background: #fff; border-color: #c8d5e5; }
html[data-theme="iatfusion"] .messaging-page .msg-compose form { background: #fff; border-color: #a3b2c5; box-shadow: var(--theme-shadow-sm); }
html[data-theme="iatfusion"] .messaging-page .msg-compose textarea { border: 0 !important; }
html[data-theme="iatfusion"] .messaging-page .msg-compose textarea:focus-visible { outline: none !important; }
html[data-theme="iatfusion"] .messaging-page .msg-compose form:focus-within { outline: 2px solid #075eaa; outline-offset: 2px; }
html[data-theme="iatfusion"] .messaging-page .msg-filters button { background: transparent !important; box-shadow: none !important; }
html[data-theme="iatfusion"] .modal-content { scrollbar-color: #8799b0 transparent; scrollbar-width: thin; }

.theme-preview.iatfusion {
    position: relative; overflow: hidden; isolation: isolate; background: #faf9f7 !important;
    background-image: radial-gradient(circle at 15% 25%, transparent 14px, #1682ff 15px, #1682ff 17px, transparent 18px) !important;
    border: 1px solid #d9e1eb !important;
}
.theme-preview.iatfusion::before { content: ''; position: absolute; top: 15%; right: 12%; width: 26px; height: 26px; background: #f04c59; border-radius: 7px; transform: rotate(10deg); }
.theme-preview.iatfusion::after { content: ''; position: absolute; bottom: 8%; right: 8%; width: 33px; height: 33px; background: #ffbf24; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.theme-preview.iatfusion .theme-preview__mini { background: #fff !important; border-color: #d9e1eb !important; }
.theme-preview.iatfusion :is(.theme-preview__pill, .theme-preview__line) { background: #075eaa !important; }

@media (min-width: 1181px) {
    html[data-theme="iatfusion"] body .pill-nav .pill-nav__items { display: flex !important; gap: 4px !important; }
    html[data-theme="iatfusion"] body .pill-nav .pill-nav__items .pill-nav__item { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; height: 40px !important; padding: 8px 13px !important; gap: 7px !important; }
    html[data-theme="iatfusion"] body .pill-nav .pill-nav__items .pill-nav__item > span,
    html[data-theme="iatfusion"] body .pill-nav .pill-nav__items .fa-chevron-down { display: inline !important; }
    html[data-theme="iatfusion"] body .pill-nav .pill-nav__toggle { display: none !important; }
    html[data-theme="iatfusion"] body .pill-nav .pill-nav__brand { flex: 0 0 auto !important; }
}
@media (max-width: 1180px), (max-height: 700px) {
    html[data-theme="iatfusion"]:has(body.page-index), html[data-theme="iatfusion"] body.page-index { height: auto; overflow-y: auto; }
    html[data-theme="iatfusion"] body.page-index :is(.app-shell, .app-container, .app-content, .dashboard-container, .home-canvas) { height: auto; min-height: 0; overflow: visible; }
    html[data-theme="iatfusion"] .hero-stage-layout { min-height: calc(100dvh - 100px); height: auto; padding-block: 36px; transform: none; }
}
@media (max-width: 1180px) {
    html[data-theme="iatfusion"] .hero-stage-layout { grid-template-columns: minmax(0, 1fr); width: min(100%, 760px); }
    html[data-theme="iatfusion"] .hero-orbit { display: none; }
}

@media (max-width: 760px) {
    html[data-theme="iatfusion"] .iat-theme-art__circle { left: -35px; }
    html[data-theme="iatfusion"] .iat-theme-art__square { right: -24px; }
    html[data-theme="iatfusion"] .iat-theme-art__triangle { right: -25px; bottom: 5%; }
    html[data-theme="iatfusion"] .messaging-page .msg-chat { padding: 12px; border-radius: 18px; }
    html[data-theme="iatfusion"] .hero-panel { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    html[data-theme="iatfusion"] .hero-action:hover { transform: none; }
}
