/* Daily brief — compact home (/dashboard/home). Tokens align with bomsync-theme; state colors are local. */
.home-daily-brief {
    --home-page-bg: var(--bomsync-page-bg);
    --home-surface: var(--bomsync-elevated-surface);
    --home-sunken: var(--bomsync-surface-sunken, #F4F6FA);
    --home-border: var(--bomsync-border);
    --home-divider: var(--bomsync-border);
    --home-text: var(--bomsync-text-primary);
    --home-text-2: var(--bomsync-text-secondary);
    --home-muted: #4F5D70;
    --home-chrome: var(--brand-blue);
    --home-action: var(--bsx-action);
    --home-ok-bg: #E3F1EA;
    --home-ok-fg: #1E5E42;
    --home-warn-bg: #FBEFD9;
    --home-warn-fg: #7A4E0E;
    --home-risk-bg: #F8E3E3;
    --home-risk-fg: #8E2B2B;
    --home-neutral-bg: #EDF0F5;
    --home-neutral-fg: #3E4C5E;
    --home-gap: 1rem;
    --home-radius: 10px;
    --home-radius-ctl: 6px;

    background: var(--home-page-bg);
    color: var(--home-text);
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--home-gap);
    max-width: 100%;
    box-sizing: border-box;
}

.home-daily-brief--loading {
    min-height: 280px;
    align-items: center;
    justify-content: center;
}

.home-brief-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--home-muted);
}

.home-brief-h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.home-brief-h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.home-brief-status-sentence {
    margin: 0;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.45;
    color: var(--home-text-2);
    max-width: 48rem;
}

.home-brief-meta {
    font-size: 0.8125rem;
    color: var(--home-muted);
}

.home-brief-mono {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.75rem;
    letter-spacing: 0;
}

.home-brief-header {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
}

.home-brief-header__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.home-brief-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.home-brief-scope--card {
    width: min(100%, 380px);
    flex-shrink: 0;
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    padding: 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.home-brief-scope--compact {
    margin-top: 0.25rem;
}

.home-brief-scope__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-brief-scope__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.home-brief-scope__sync {
    font-size: 0.8125rem;
    color: var(--home-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.home-brief-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 1.5rem;
    padding: 0 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.home-brief-pill--ok { background: var(--home-ok-bg); color: var(--home-ok-fg); }
.home-brief-pill--warn { background: var(--home-warn-bg); color: var(--home-warn-fg); }
.home-brief-pill--risk { background: var(--home-risk-bg); color: var(--home-risk-fg); }
.home-brief-pill--neutral { background: var(--home-neutral-bg); color: var(--home-neutral-fg); }

.home-brief-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    display: inline-block;
    background: currentColor;
}

.home-brief-pill--ok .home-brief-pill__dot { background: #2E7D5B; }
.home-brief-pill--warn .home-brief-pill__dot { background: #B7791F; }
.home-brief-pill--risk .home-brief-pill__dot { background: #B23B3B; }

.home-brief-pill__dot--ok { background: #2E7D5B !important; }

.home-brief-composer {
    background: var(--home-chrome);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.home-brief-composer__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8DB8D8;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.home-brief-composer__title {
    margin: 0.15rem 0 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--bomsync-on-dark-text);
}

.home-brief-composer__lead {
    margin: 0.25rem 0 0;
    font-size: 0.9375rem;
    color: #C3D0DE;
}

.home-brief-composer__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.home-brief-composer__link {
    color: #C3D0DE;
    font-size: 0.875rem;
    white-space: nowrap;
}

.home-brief-composer__row {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.home-brief-composer__input-wrap {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff;
    border-radius: 10px;
    padding: 0 0.35rem 0 0.5rem;
    min-height: 56px;
}

.home-daily-brief .home-brief-composer__input-wrap .e-input-group,
.home-daily-brief .home-brief-composer__input-wrap .e-input-group.e-control-wrapper {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.home-daily-brief .home-brief-composer__input-wrap input.e-input {
    font-size: 1rem;
}

.home-brief-composer__mic,
.home-brief-composer__attach,
.home-brief-composer__mic-inline {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.home-daily-brief .home-brief-composer__attach {
    border: 1px solid #C5CEDA;
    background: #fff;
    color: var(--home-text-2);
}

.home-daily-brief .home-brief-composer__mic-inline {
    border: 0;
    background: transparent;
    color: var(--home-muted);
}

.home-brief-composer__mic {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--home-action);
    color: #fff;
    border: 1px solid #5E93BA;
}

.home-brief-composer__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.home-brief-composer__suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.home-brief-composer__suggest-label {
    font-size: 0.8125rem;
    color: #C3D0DE;
    margin-right: 0.25rem;
}

.home-brief-chip {
    height: 34px;
    padding: 0 0.875rem;
    border-radius: 17px;
    border: 1px solid #3A4D69;
    background: #1C2A40;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.home-daily-brief--field .home-brief-chip {
    height: 44px;
    border-radius: 22px;
    font-size: 0.875rem;
}

.home-brief-composer__resume {
    font-size: 0.8125rem;
    color: #C3D0DE;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.home-brief-composer__resume a {
    color: #fff;
    font-weight: 500;
}

.home-brief-composer__steps {
    padding: 0 0.5rem;
    border-radius: 11px;
    background: #1C2A40;
    border: 1px solid #3A4D69;
}

.home-brief-card {
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    overflow: hidden;
}

.home-brief-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.125rem;
    border-bottom: 1px solid var(--home-divider);
    gap: 0.5rem;
}

.home-brief-pulse-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-brief-pulse-grid--timeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-brief-pulse-tile {
    padding: 1rem 1.125rem;
    border-right: 1px solid var(--home-divider);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
}

.home-brief-pulse-tile:last-child {
    border-right: 0;
}

.home-brief-pulse-tile--static {
    text-decoration: none;
}

.home-brief-pulse-count {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
}

.home-brief-pulse-summary {
    font-size: 0.875rem;
    color: var(--home-text-2);
}

.home-daily-brief__split {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    gap: var(--home-gap);
    align-items: start;
}

.home-brief-side {
    display: flex;
    flex-direction: column;
    gap: var(--home-gap);
}

.home-brief-needs-row {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.125rem;
    border-bottom: 1px solid var(--home-divider);
    align-items: center;
    flex-wrap: wrap;
}

.home-brief-needs-row:last-child {
    border-bottom: 0;
}

.home-brief-needs-when {
    width: 5.25rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.home-brief-needs-body {
    flex: 1;
    min-width: 200px;
}

.home-brief-needs-title {
    font-size: 1rem;
    font-weight: 600;
}

.home-brief-needs-consequence {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--home-text-2);
}

.home-brief-needs-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.home-brief-wait-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1.125rem;
    border-bottom: 1px solid var(--home-divider);
    align-items: center;
}

.home-brief-wait-row:last-child {
    border-bottom: 0;
}

.home-brief-change-list {
    padding: 0.65rem 1.125rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.home-brief-change-row {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    font-size: 0.875rem;
}

.home-brief-change-row .home-brief-mono {
    width: 2.75rem;
    flex-shrink: 0;
}

.home-brief-empty {
    padding: 1rem 1.125rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--home-muted);
}

.home-brief-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--home-gap);
}

.home-brief-at-risk {
    padding: 1rem 1.125rem;
}

.home-brief-week-list {
    padding: 0.35rem 1.125rem 0.875rem;
}

.home-brief-week-row {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--home-divider);
    font-size: 0.875rem;
}

.home-brief-week-row:last-child {
    border-bottom: 0;
}

.home-brief-week-date {
    width: 3rem;
    flex-shrink: 0;
}

.home-brief-week-num {
    font-size: 1.25rem;
    font-weight: 600;
}

.home-brief-impact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1.125rem;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    background: var(--home-sunken);
    font-size: 0.875rem;
    color: var(--home-text-2);
}

.home-brief-impact__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.home-daily-brief button.home-brief-btn,
.home-daily-brief button.home-brief-chip,
.home-daily-brief a.home-brief-btn {
    appearance: none;
    -webkit-appearance: none;
    font-family: var(--font-sans, 'Segoe UI', system-ui, sans-serif);
    line-height: 1.2;
    box-sizing: border-box;
}

.home-brief-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    height: 40px;
    padding: 0 1rem;
    border-radius: var(--home-radius-ctl);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
}

.home-daily-brief button.home-brief-btn:hover,
.home-daily-brief button.home-brief-chip:hover {
    filter: brightness(0.97);
}

.home-daily-brief--field .home-brief-btn,
.home-daily-brief--tablet .home-brief-btn {
    height: 48px;
    font-size: 0.9375rem;
}

.home-brief-btn--primary {
    background: var(--home-action);
    color: #fff;
    border-color: var(--home-action);
}

.home-brief-btn--quiet {
    background: #fff;
    color: var(--home-text);
    border-color: #C5CEDA;
}

.home-brief-btn--sm {
    height: 32px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

.home-brief-btn--composer {
    height: 56px;
    padding: 0 1.25rem;
    border-radius: 10px;
    border-color: #5E93BA;
}

.home-brief-proj-link {
    font-weight: 600;
    color: var(--home-text);
    text-decoration: none;
}

.home-brief-proj-link:hover {
    color: var(--home-action);
}

/* Sunken grid header on home only */
.home-daily-brief .home-brief-grid-sunken .e-gridheader,
.home-daily-brief .home-brief-grid-sunken .e-headercell {
    background: var(--home-sunken) !important;
    color: var(--home-muted) !important;
    border-color: var(--home-divider) !important;
}

.home-daily-brief .home-brief-grid-sunken .e-headertext {
    color: var(--home-muted) !important;
}

.home-daily-brief .home-brief-card__head a {
    color: var(--home-action);
    font-size: 0.875rem;
    text-decoration: none;
}

.home-daily-brief .home-brief-card__head a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Curated workspace (/curated/{id}) — hero body uses standard BomsyncPageChrome */
.curated-workspace-page .home-daily-brief {
    padding: 0;
}

.home-curated-panel {
    max-width: 960px;
}

.home-curated-progress {
    color: var(--bomsync-on-dark-text, #e8edf5);
}

.home-curated-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.home-curated-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--home-divider, var(--bomsync-border));
}

.home-curated-step:last-child {
    border-bottom: 0;
}

.home-curated-step__index {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--home-neutral-bg, #edf0f5);
    color: var(--home-neutral-fg, #3e4c5e);
}

.home-curated-step__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.home-curated-step__link {
    font-weight: 600;
    font-size: 1rem;
    color: var(--home-text, var(--bomsync-text-primary));
    text-decoration: none;
}

.home-curated-step__link:hover {
    color: var(--home-action, var(--bsx-action));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-curated-step.is-done .home-curated-step__index {
    background: var(--home-ok-bg);
    color: var(--home-ok-fg);
}

.home-curated-step.is-done {
    opacity: 0.85;
}

.home-curated-step.is-done .home-curated-step__link {
    text-decoration: line-through;
    text-decoration-color: var(--home-muted);
}

@media (max-width: 1279px) {
    .home-brief-header {
        flex-direction: column;
    }

    .home-brief-scope--card {
        width: 100%;
    }

    .home-brief-pulse-grid,
    .home-brief-pulse-grid--timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-brief-pulse-tile:nth-child(2n) {
        border-right: 0;
    }

    .home-daily-brief__split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 899px) {
    .home-daily-brief {
        padding: 1rem;
        gap: 0.875rem;
    }

    .home-brief-pulse-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .home-brief-pulse-tile {
        min-width: 70%;
        scroll-snap-align: start;
        border-right: 1px solid var(--home-divider);
    }

    .home-brief-field-grid {
        grid-template-columns: 1fr;
    }

    .home-brief-needs-actions {
        width: 100%;
    }

    .home-brief-needs-actions .home-brief-btn {
        flex: 1;
    }

    .home-curated-step {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .home-curated-step .home-brief-btn--sm {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 1280px) {
    .home-daily-brief {
        padding: 1.5rem 2rem 2rem;
        gap: 1.25rem;
    }
}
