/* ThinkTwin Sprint 3.5 — Executive OS PWA design system */
@import url('executive-tokens.css');

.executive-brief-pwa {
    position: relative;
    z-index: 1;
}

.executive-brief-pwa.brief-homepage {
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.journey-shell .journey-content {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 48px) 20px;
}

.journey-header {
    text-align: center;
    margin-bottom: 24px;
}

.journey-tagline {
    color: var(--eos-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

.journey-stage h1 {
    margin: 8px 0 12px;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.journey-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.journey-form textarea {
    width: 100%;
    min-height: 120px;
    border-radius: 14px;
    border: 1px solid var(--eos-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--eos-text);
    padding: 12px 14px;
    font-family: inherit;
}

.journey-question {
    font-weight: 700;
}

.journey-why,
.journey-progress,
.journey-domain-list {
    color: var(--eos-muted);
    font-size: 0.9rem;
}

.journey-intro {
    color: var(--eos-muted);
    line-height: 1.5;
}

.journey-day-one-progress {
    margin: 20px 0;
    display: grid;
    gap: 8px;
}

.journey-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--eos-muted);
}

.journey-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.journey-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--eos-cyan), var(--eos-purple));
}

.journey-conversation .journey-chat-form {
    margin-top: 20px;
}

.journey-chat-bubble {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--eos-border);
    margin-bottom: 12px;
}

.journey-chat-assistant {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
}

.journey-chat-user {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.2);
}

.journey-role-options {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.journey-role-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--eos-border);
    cursor: pointer;
}

.journey-role-option:has(input:checked) {
    border-color: var(--eos-cyan);
    background: rgba(34, 211, 238, 0.08);
}

.journey-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--eos-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--eos-text);
}

.journey-yes-no {
    display: flex;
    gap: 16px;
}

.eos-profile-completeness {
    margin-bottom: 16px;
}

.eos-profile-completeness-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.eos-profile-overall {
    font-weight: 700;
    color: var(--eos-cyan);
}

.eos-profile-bars {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.eos-profile-bar-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    align-items: center;
}

.eos-profile-bar-label {
    font-size: 0.85rem;
    color: var(--eos-muted);
}

.eos-profile-bar-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.eos-profile-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--eos-lime), var(--eos-cyan));
}

.eos-progressive-discovery {
    margin-bottom: 16px;
}

.eos-progressive-intro {
    color: var(--eos-muted);
    margin-bottom: 12px;
}

.eos-partial-evidence {
    color: var(--eos-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.eos-priority-title.eos-partial {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

.journey-completion-ring {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin: 16px 0;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--eos-border);
}

.journey-plan-sections {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: grid;
    gap: 10px;
}

.journey-plan-sections li {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--eos-border);
    background: rgba(255, 255, 255, 0.03);
}

.journey-plan-sections span {
    display: block;
    color: var(--eos-muted);
    font-size: 0.85rem;
    margin-top: 4px;
    word-break: break-word;
}

.journey-complete {
    color: #a3e635;
    font-weight: 600;
}

.journey-blocked {
    color: #fb923c;
}


body.executive-os {
    background: var(--eos-bg);
    color: var(--eos-text);
    font-family: 'Cairo', system-ui, sans-serif;
    min-height: 100dvh;
    overflow-x: hidden;
}

body.executive-os .sidebar,
body.executive-os .workspace > .topbar,
body.executive-os .sidebar-backdrop {
    display: none !important;
}

.eos-brain-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.eos-brain-artwork {
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(140vw, 1200px);
    transform: translate(-50%, -50%);
    opacity: 0.55;
    animation: eos-brain-drift 28s ease-in-out infinite alternate;
}

.eos-neural-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.35;
}

@keyframes eos-brain-drift {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-49%, -48%) scale(1.03); }
}

.eos-icon-rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--eos-rail-width);
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: rgba(6, 7, 18, 0.88);
    border-right: 1px solid var(--eos-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.eos-brand {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 18px;
}

.eos-brand-text {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.eos-brand-tagline {
    display: none;
}

.eos-rail-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    width: 100%;
    overflow-y: auto;
    scrollbar-width: none;
}

.eos-rail-nav::-webkit-scrollbar {
    display: none;
}

.eos-rail-link {
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--eos-muted);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.eos-rail-link:hover,
.eos-rail-link.is-active {
    color: var(--eos-text);
    background: rgba(168, 85, 247, 0.14);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.25);
}

.eos-rail-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.eos-rail-label {
    display: none;
}

.eos-rail-footer {
    display: grid;
    gap: 8px;
    justify-items: center;
    margin-top: 8px;
}

.eos-profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--eos-cyan), var(--eos-purple));
    font-weight: 700;
    font-size: 0.9rem;
}

.eos-profile-link {
    text-decoration: none;
    color: inherit;
}

.eos-logout-btn {
    border: 0;
    background: transparent;
    color: var(--eos-muted);
    cursor: pointer;
    font-size: 1rem;
}

.eos-shell {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    margin-left: var(--eos-rail-width);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.eos-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 40px) calc(var(--eos-bottom-nav-height) + 24px);
}

.eos-brief-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: clamp(20px, 3vw, 32px);
}

.eos-greeting {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
}

.eos-wave {
    display: inline-block;
    animation: eos-wave 2.4s ease-in-out infinite;
}

@keyframes eos-wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(14deg); }
    75% { transform: rotate(-8deg); }
}

.eos-ready-caption {
    margin: 8px 0 0;
    color: var(--eos-muted);
    font-size: 0.95rem;
}

.eos-meta-block {
    text-align: end;
    color: var(--eos-muted);
    font-size: 0.9rem;
}

.eos-date {
    display: block;
    font-weight: 600;
    color: var(--eos-text);
}

.eos-weather {
    margin: 6px 0 0;
}

.eos-brief-grid {
    display: grid;
    gap: clamp(14px, 2vw, 20px);
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
        "priority priority priority priority why why why why confidence confidence confidence confidence"
        "risk risk risk risk opportunity opportunity opportunity opportunity focus focus focus focus"
        "notifications notifications notifications notifications notifications notifications change change change change change change";
}

.eos-card-priority { grid-area: priority; }
.eos-card-why { grid-area: why; }
.eos-card-confidence { grid-area: confidence; }
.eos-card-risk { grid-area: risk; }
.eos-card-opportunity { grid-area: opportunity; }
.eos-card-focus { grid-area: focus; }
.eos-card-notifications { grid-area: notifications; }
.eos-card-change { grid-area: change; }

.eos-card {
    background: var(--eos-glass);
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius);
    padding: clamp(16px, 2.5vw, 22px);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--eos-glow);
}

.eos-eyebrow {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--eos-muted);
}

.eos-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.eos-card-icon {
    font-size: 1.1rem;
}

.eos-icon-risk { color: var(--eos-orange); }
.eos-icon-opportunity { color: var(--eos-lime); }
.eos-icon-focus { color: var(--eos-pink); }
.eos-icon-bell { color: var(--eos-cyan); }
.eos-icon-flame { color: var(--eos-orange); }

.eos-priority-title {
    margin: 8px 0 12px;
    font-size: clamp(1.2rem, 2.5vw, 1.65rem);
    font-weight: 700;
    line-height: 1.35;
}

.eos-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.45);
    color: #fdba74;
}

.eos-why-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.eos-why-list li {
    position: relative;
    padding-inline-start: 22px;
    line-height: 1.5;
    font-size: 0.92rem;
}

.eos-why-list li::before {
    content: '✓';
    position: absolute;
    inset-inline-start: 0;
    color: var(--eos-cyan);
    font-weight: 700;
}

.eos-domain-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.eos-domain-icons li {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 52px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid var(--eos-border);
    font-size: 0.65rem;
    color: var(--eos-muted);
}

.eos-domain-icons li[data-status="complete"] {
    border-color: rgba(163, 230, 53, 0.45);
    color: #d9f99d;
}

.eos-domain-icons li[data-status="partial"] {
    border-color: rgba(251, 191, 36, 0.45);
}

.eos-domain-icon {
    font-size: 0.95rem;
}

.eos-card-confidence {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.eos-confidence-ring {
    position: relative;
    width: min(140px, 40vw);
    aspect-ratio: 1;
    margin: 12px 0 8px;
}

.eos-confidence-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.eos-ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 10;
}

.eos-ring-progress {
    fill: none;
    stroke: url(#eosRingGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: calc(327 * var(--confidence-offset, 4) / 100);
    transition: stroke-dashoffset 0.8s ease;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.45));
}

.eos-confidence-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 800;
}

.eos-confidence-caption {
    margin: 0;
    color: var(--eos-muted);
    font-size: 0.85rem;
}

.eos-widget-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.eos-widget-list li {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    line-height: 1.45;
}

.eos-empty {
    color: var(--eos-muted);
    font-style: italic;
}

.eos-change-form {
    display: grid;
    gap: 14px;
    margin-top: 10px;
}

.eos-change-input-wrap {
    position: relative;
}

.eos-change-form textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    border-radius: 14px;
    border: 1px solid var(--eos-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--eos-text);
    padding: 12px 44px 12px 14px;
    font-family: inherit;
    font-size: 0.92rem;
}

.eos-send-btn {
    position: absolute;
    inset-inline-end: 10px;
    bottom: 10px;
    border: 0;
    background: transparent;
    color: var(--eos-cyan);
    font-size: 1.2rem;
    cursor: pointer;
}

.eos-cta {
    border: 0;
    border-radius: 14px;
    padding: 14px 20px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    color: #fff;
}

.eos-cta-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #22d3ee 100%);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.eos-cta-gradient:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(124, 58, 237, 0.45);
}

.eos-cta-gradient:disabled {
    opacity: 0.65;
    cursor: wait;
}

.eos-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: calc(var(--eos-bottom-nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(6, 7, 18, 0.94);
    border-top: 1px solid var(--eos-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.eos-bottom-link {
    flex: 1;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--eos-muted);
    font-size: 0.62rem;
    padding-top: 8px;
}

.eos-bottom-link.is-active {
    color: var(--eos-cyan);
}

.eos-bottom-icon {
    font-size: 1.15rem;
}

.eos-pwa-install {
    position: fixed;
    left: 50%;
    bottom: calc(var(--eos-bottom-nav-height) + 16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(92vw, 420px);
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(14, 16, 38, 0.95);
    border: 1px solid var(--eos-border);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.eos-pwa-install[hidden] {
    display: none !important;
}

.eos-pwa-install-btn {
    border: 0;
    border-radius: 10px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--eos-purple), var(--eos-blue));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.eos-pwa-install-dismiss {
    border: 0;
    background: transparent;
    color: var(--eos-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.eos-ios-install {
    border: 1px solid var(--eos-border);
    border-radius: var(--eos-radius);
    background: var(--eos-surface);
    color: var(--eos-text);
    padding: 20px;
    max-width: 360px;
}

.eos-ios-install::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

@media (max-width: 1023px) {
    .eos-brief-grid {
        grid-template-areas:
            "priority priority priority priority priority priority why why why why why why"
            "confidence confidence confidence confidence confidence confidence confidence confidence confidence confidence confidence confidence"
            "risk risk risk risk risk risk opportunity opportunity opportunity opportunity opportunity opportunity"
            "focus focus focus focus focus focus focus focus focus focus focus focus"
            "notifications notifications notifications notifications notifications notifications notifications notifications notifications notifications notifications notifications"
            "change change change change change change change change change change change change";
    }
}

@media (max-width: 767px) {
    .eos-icon-rail {
        display: none;
    }

    .eos-shell {
        margin-left: 0;
    }

    .eos-bottom-nav {
        display: flex;
    }

    .eos-brief-header {
        flex-direction: column;
    }

    .eos-meta-block {
        text-align: start;
    }

    .eos-brief-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "priority"
            "confidence"
            "why"
            "risk"
            "opportunity"
            "focus"
            "notifications"
            "change";
    }
}

[dir="rtl"] .executive-brief-pwa {
    text-align: right;
}

[dir="rtl"] .eos-meta-block {
    text-align: start;
}

@media (max-width: 767px) {
    [dir="rtl"] .eos-meta-block {
        text-align: inherit;
    }
}

/* Alpha A2 — suppress legacy dashboard/chatbot UI inside Executive OS shell */
body.executive-os .dashboard-panels,
body.executive-os .dashboard-secondary,
body.executive-os .executive-onboarding-card,
body.executive-os .quick-action-grid,
body.executive-os .quick-action-button,
body.executive-os .insights-card,
body.executive-os [data-executive-results],
body.executive-os .glass-card:not(.eos-card) {
    display: none !important;
}

/* Conversation + workspace pages on Executive OS shell */
.eos-page {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.25rem 6rem;
}

.eos-page-header {
    margin-bottom: 1.25rem;
}

.eos-page-title {
    margin: 0.35rem 0 0.5rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

.eos-page-lead {
    margin: 0;
    color: var(--eos-muted, rgba(255, 255, 255, 0.72));
    line-height: 1.6;
}

.conversation-workspace .executive-session-workspace {
    padding: 1.25rem;
}

.conversation-workspace .executive-session-input {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conversation-workspace .conversation-status {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--eos-accent, #7c6cff);
}

.conversation-workspace textarea[data-conversation-input] {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 10, 30, 0.65);
    color: inherit;
    padding: 0.85rem 1rem;
    font-family: inherit;
}

.workspace-placeholder .eos-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

/* Alpha A3 — Executive Conversation Workspace */
.executive-conversation-workspace {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 980px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem 7rem;
    min-height: calc(100dvh - 2rem);
}

.eos-conversation-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.eos-conversation-title {
    margin: 0.25rem 0 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.eos-conversation-context-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.eos-context-card {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(12, 14, 40, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.eos-context-value {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
}

.eos-context-priority {
    font-weight: 700;
    color: #f0abfc;
}

.eos-conversation-timeline-section {
    flex: 1;
    min-height: 200px;
}

.eos-conversation-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.eos-timeline-entry {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 12, 36, 0.78);
    backdrop-filter: blur(10px);
}

.eos-timeline-user {
    border-inline-start: 3px solid #22d3ee;
}

.eos-timeline-executive {
    border-inline-start: 3px solid #a855f7;
    box-shadow: 0 8px 32px rgba(124, 108, 255, 0.12);
}

.eos-timeline-error {
    border-inline-start: 3px solid #fb923c;
}

.eos-timeline-entry-head {
    margin-bottom: 0.65rem;
}

.eos-timeline-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.eos-timeline-user-text {
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
}

.eos-executive-response {
    display: grid;
    gap: 0.75rem;
}

.eos-response-block-title {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #22d3ee;
}

.eos-response-block-body {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

.eos-response-block-body ul {
    margin: 0.35rem 0 0;
    padding-inline-start: 1.1rem;
}

.eos-response-block-body p {
    margin: 0;
}

.eos-conversation-thinking {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(124, 108, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.eos-thinking-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #a855f7;
    animation: eos-thinking-pulse 1.2s ease-in-out infinite;
}

@keyframes eos-thinking-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1); }
}

.eos-conversation-composer {
    position: fixed;
    inset-inline: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    padding: 0.75rem 1rem 1rem;
    background: linear-gradient(180deg, transparent, rgba(10, 11, 30, 0.92) 28%);
    pointer-events: none;
}

.eos-conversation-form {
    pointer-events: auto;
    max-width: 980px;
    margin: 0 auto;
    padding: 0.85rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(8, 10, 32, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.eos-composer-textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.55;
    padding: 0.25rem 0.15rem;
}

.eos-composer-textarea:focus {
    outline: none;
}

.eos-composer-textarea::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.eos-composer-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.eos-composer-tool {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.82);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.eos-composer-tool-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.eos-composer-send {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.15rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #22d3ee, #a855f7);
    color: #0a0b1e;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.eos-composer-send:disabled {
    opacity: 0.55;
    cursor: wait;
}

.eos-composer-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.eos-attachment-chip {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.15);
    color: #67e8f9;
}

@media (max-width: 1023px) {
    .eos-conversation-context-grid {
        grid-template-columns: 1fr;
    }

    .executive-conversation-workspace {
        padding-bottom: 8rem;
    }
}

@media (max-width: 767px) {
    .executive-conversation-workspace {
        padding-inline: 0.85rem;
        padding-bottom: 9rem;
    }

    .eos-conversation-composer {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        padding-inline: 0.65rem;
    }

    .eos-composer-tool-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .eos-composer-send span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }
}

@media (min-width: 1024px) {
    .eos-conversation-composer {
        bottom: 0;
        padding-bottom: 1.25rem;
    }
}

[dir="rtl"] .executive-conversation-workspace {
    text-align: right;
}

[dir="rtl"] .eos-composer-send {
    margin-inline-start: 0;
    margin-inline-end: auto;
}

/* Sprint U2 — Executive Master Plan document */

.executive-master-plan {
    display: grid;
    gap: 1.25rem;
    max-width: 1120px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.emp-hero {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.emp-title {
    margin: 0.35rem 0 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.emp-subtitle {
    color: var(--eos-muted);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 52ch;
}

.emp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1.25rem;
    align-items: center;
}

.emp-status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(34, 211, 238, 0.15);
    color: var(--eos-cyan);
    border: 1px solid rgba(34, 211, 238, 0.35);
}

.emp-meta-item {
    color: var(--eos-muted);
    font-size: 0.88rem;
}

.emp-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.emp-stat {
    display: grid;
    gap: 0.5rem;
}

.emp-stat-label {
    font-size: 0.85rem;
    color: var(--eos-muted);
}

.emp-stat-ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1rem;
    background: conic-gradient(var(--eos-cyan) calc(var(--emp-percent, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
    position: relative;
}

.emp-stat-ring::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--eos-bg-deep);
}

.emp-stat-ring span {
    position: relative;
    z-index: 1;
}

.emp-stat-ring-alt {
    background: conic-gradient(var(--eos-purple) calc(var(--emp-percent, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.emp-section-title {
    margin: 0 0 1rem;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 700;
}

.emp-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.emp-summary-block h3 {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--eos-cyan);
}

.emp-lead {
    font-size: 1.15rem;
    line-height: 1.5;
    margin: 0;
}

.emp-timeline-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.emp-timeline-segment {
    min-width: 140px;
    padding: 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--eos-border);
    background: rgba(255, 255, 255, 0.02);
}

.emp-timeline-segment.is-active {
    border-color: rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.08);
}

.emp-timeline-node {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.emp-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--eos-purple);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

.emp-timeline-label {
    font-weight: 700;
    font-size: 0.85rem;
}

.emp-timeline-items {
    margin: 0;
    padding-inline-start: 1.1rem;
    font-size: 0.85rem;
    color: var(--eos-muted);
    display: grid;
    gap: 0.35rem;
}

.emp-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.emp-goal-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.emp-goal-card {
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--eos-border);
    background: rgba(255, 255, 255, 0.03);
}

.emp-goal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.emp-goal-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.emp-priority-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.15);
    color: var(--eos-orange);
    white-space: nowrap;
}

.emp-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.emp-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--eos-cyan), var(--eos-purple));
}

.emp-progress-bar-sm {
    height: 5px;
    margin-bottom: 0;
}

.emp-goal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
    margin: 0;
}

.emp-goal-meta div {
    display: grid;
    gap: 0.15rem;
}

.emp-goal-meta dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--eos-muted);
}

.emp-goal-meta dd {
    margin: 0;
    font-size: 0.9rem;
}

.emp-milestone-list {
    margin: 0;
    padding-inline-start: 1.25rem;
    display: grid;
    gap: 1rem;
}

.emp-milestone-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.emp-milestone-head span {
    color: var(--eos-muted);
    white-space: nowrap;
}

.emp-project-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.emp-project-group h3 {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--eos-muted);
}

.emp-project-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.emp-project-card {
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--eos-border);
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 0.35rem;
}

.emp-project-card strong {
    font-size: 0.95rem;
}

.emp-project-card > span {
    font-size: 0.8rem;
    color: var(--eos-muted);
}

.emp-project-reason {
    margin: 0;
    font-size: 0.82rem;
    color: var(--eos-orange);
}

.emp-domain-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.emp-domain-bars li {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: center;
}

.emp-insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.emp-insight-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.emp-severity {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--eos-orange);
}

.emp-severity[data-severity="high"],
.emp-severity[data-severity="critical"] {
    color: #f87171;
}

.emp-severity[data-severity="low"] {
    color: var(--eos-lime);
}

.emp-insight-list p {
    margin: 0;
    color: var(--eos-muted);
    line-height: 1.5;
}

.emp-dependency-list,
.emp-notes-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.emp-dependency-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--eos-border);
}

.emp-dependency-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--eos-cyan);
}

.emp-notes-list li {
    padding-inline-start: 1rem;
    border-inline-start: 3px solid var(--eos-purple);
    line-height: 1.55;
    color: var(--eos-muted);
}

.emp-empty-inline,
.emp-empty-state p {
    color: var(--eos-muted);
    margin: 0;
}

.emp-actions {
    text-align: center;
    padding: 1.5rem;
}

[dir="rtl"] .executive-master-plan {
    text-align: right;
}

[dir="rtl"] .emp-timeline-items {
    padding-inline-start: 0;
    padding-inline-end: 1.1rem;
}

[dir="rtl"] .emp-milestone-list {
    padding-inline-start: 0;
    padding-inline-end: 1.25rem;
}

[dir="rtl"] .emp-notes-list li {
    padding-inline-start: 0;
    padding-inline-end: 1rem;
    border-inline-start: none;
    border-inline-end: 3px solid var(--eos-purple);
}

/* Sprint U3 — Never-empty Executive Brief */

.eos-missing-data {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    border: 1px solid rgba(34, 211, 238, 0.25);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(168, 85, 247, 0.06));
}

.eos-missing-data-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.eos-missing-data-list {
    margin: 0.5rem 0 0;
    padding-inline-start: 1.1rem;
    display: grid;
    gap: 0.35rem;
    color: var(--eos-muted);
}

.eos-confidence-explanation {
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--eos-muted);
    text-align: center;
}

[dir="rtl"] .eos-missing-data-list {
    padding-inline-start: 0;
    padding-inline-end: 1.1rem;
}

/* Sprint U4 — Executive Daily Rhythm */

.eos-rhythm-welcome {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid rgba(168, 85, 247, 0.25);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(34, 211, 238, 0.06));
}

.eos-rhythm-welcome-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.eos-rhythm-header {
    display: grid;
    gap: 0.75rem;
}

.eos-rhythm-header-main {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.eos-rhythm-streak {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(251, 146, 60, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.35);
}

.eos-rhythm-streak-value {
    color: #fdba74;
}

.eos-rhythm-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.eos-rhythm-timeline-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--eos-muted);
    font-size: 0.88rem;
}

.eos-rhythm-timeline-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.45);
}

.eos-rhythm-status-completed .eos-rhythm-timeline-dot {
    background: #34d399;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.eos-rhythm-status-active .eos-rhythm-timeline-dot {
    background: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.eos-rhythm-status-pending .eos-rhythm-timeline-dot {
    background: #fbbf24;
}

.eos-rhythm-night-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--eos-muted);
}

.eos-morning-experience {
    display: grid;
    gap: 1.25rem;
    border: 1px solid rgba(34, 211, 238, 0.25);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(30, 27, 75, 0.85));
}

.eos-morning-head {
    display: grid;
    gap: 0.35rem;
}

.eos-morning-greeting {
    margin: 0;
    font-size: 0.95rem;
    color: #67e8f9;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eos-morning-title {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.eos-morning-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.eos-morning-block h3 {
    margin: 0.35rem 0 0;
    font-size: 1.05rem;
    line-height: 1.45;
}

.eos-morning-outcomes,
.eos-outcomes-list {
    margin: 0.5rem 0 0;
    padding-inline-start: 1.1rem;
    display: grid;
    gap: 0.35rem;
}

.eos-morning-confidence-value {
    margin: 0.35rem 0 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #a78bfa;
}

.eos-morning-start-form {
    margin-top: 0.25rem;
}

.eos-cta-large {
    width: 100%;
    padding: 0.95rem 1.25rem;
    font-size: 1.05rem;
}

.eos-workload-caption {
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    color: var(--eos-muted);
}

.eos-night-review {
    display: grid;
    gap: 1.25rem;
    max-width: 720px;
    margin: 0 auto;
}

.eos-night-title {
    margin: 0.25rem 0 0;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.eos-night-review-form {
    display: grid;
    gap: 1rem;
}

.eos-night-field {
    display: grid;
    gap: 0.75rem;
    border: none;
    margin: 0;
    padding: 1rem;
}

.eos-night-field legend {
    font-weight: 600;
    padding: 0;
}

.eos-night-field textarea {
    width: 100%;
    resize: vertical;
}

.eos-night-yes-no {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.eos-night-actions {
    display: grid;
    gap: 0.75rem;
    justify-items: start;
}

.eos-night-skip {
    color: var(--eos-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.eos-night-skip:hover {
    color: var(--eos-text);
}

@media (max-width: 767px) {
    .eos-morning-grid {
        grid-template-columns: 1fr;
    }

    .eos-rhythm-timeline {
        flex-direction: column;
    }
}

@media (max-width: 1023px) {
    .emp-summary-grid,
    .emp-two-col {
        grid-template-columns: 1fr;
    }

    .emp-project-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emp-timeline-track {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 767px) {
    .executive-master-plan {
        gap: 1rem;
    }

    .emp-project-groups {
        grid-template-columns: 1fr;
    }

    .emp-timeline-track {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .emp-domain-bars li {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .emp-goal-meta {
        grid-template-columns: 1fr;
    }
}

