/* workspace-hub.css ───── The workspace command surface ─────
   Add to the css <link> set (after components.css). The signature elements are the
   state ribbon (lifecycle: Setting up → Ready → Counting) and the lime "due" pulse.
   The logo's lime accent is allowed into the UI here, sparingly, as the language of
   earned state: a completed ribbon stage and the live "what's due" count — because
   "what's due" is the product. */

/* ── Header ── */
.wh-header {
    margin-bottom: 1.25rem;
}

.wh-header-top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.wh-titles {
    flex: 1;
    min-width: 0;
}

.wh-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.wh-subtitle {
    font-size: 0.85rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
}

.wh-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* ── State ribbon (signature) ──
   Three stages with connecting rules; the current stage is filled near-black,
   done stages are muted-complete, todo stages are hairline. */
.wh-ribbon {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.7rem 1rem;
    background: var(--mud-palette-background-grey);
    border: 0.5px solid var(--mud-palette-divider);
    border-radius: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.wh-ribbon-stage {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.wh-ribbon-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1.5px solid var(--mud-palette-divider);
    background: transparent;
    flex-shrink: 0;
}

.wh-ribbon-stage.done .wh-ribbon-dot {
    background: #D9E021; /* lime — the brand accent for a completed stage */
    border-color: #D9E021;
}

.wh-ribbon-stage.current .wh-ribbon-dot {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.wh-ribbon-stage.done .wh-ribbon-label {
    color: var(--mud-palette-text-secondary);
}

.wh-ribbon-stage.current .wh-ribbon-label {
    color: var(--mud-palette-text-primary);
}

.wh-ribbon-stage.todo .wh-ribbon-label {
    color: var(--mud-palette-text-disabled);
}

.wh-ribbon-sep {
    width: 28px;
    height: 1px;
    background: var(--mud-palette-divider);
    margin: 0 0.6rem;
    flex-shrink: 0;
}

.wh-ribbon-note {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--mud-palette-text-secondary);
    padding-left: 1rem;
}

/* ── Sub-tabs ── */
.wh-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 0.5px solid var(--mud-palette-divider);
}

.wh-tab {
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.9rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s ease, border-color 0.15s ease;
    margin-bottom: -0.5px;
}

    .wh-tab:hover {
        color: var(--mud-palette-text-primary);
    }

    .wh-tab.active {
        color: var(--mud-palette-text-primary);
        border-bottom-color: var(--mud-palette-primary);
    }

.wh-tab-count {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0 6px;
    border-radius: 8px;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-secondary);
    border: 0.5px solid var(--mud-palette-divider);
}

.wh-tab.active .wh-tab-count {
    background: rgba(17, 17, 17, 0.06);
    color: var(--mud-palette-text-primary);
    border-color: var(--mud-palette-primary);
}

/* ── Body + panels ── */
.wh-body {
    padding-top: 1.25rem;
}

.wh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.wh-panel {
    background: var(--mud-palette-surface);
    border: 0.5px solid var(--mud-palette-divider);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
}

.wh-panel-wide {
    grid-column: 1 / -1;
}

.wh-link {
    margin-top: 0.5rem;
    padding-left: 0;
    justify-content: flex-start;
}

/* ── Due pulse — THE lime moment ──
   Big number, lime pulse ring. The only UI use of the brand accent. */
.wh-due {
    border-color: var(--mud-palette-primary);
    position: relative;
}

.wh-due-figure {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.wh-due-number {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--mud-palette-text-primary);
    letter-spacing: -1px;
}

.wh-due-number-sm {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    margin-right: 0.4rem;
}

.wh-due-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D9E021; /* lime — the accent, used once */
    margin-left: 0.6rem;
    margin-top: -1.4rem;
    box-shadow: 0 0 0 0 rgba(217, 224, 33, 0.6);
    animation: wh-pulse 2.2s infinite;
}

@keyframes wh-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 224, 33, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(217, 224, 33, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 224, 33, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wh-due-pulse {
        animation: none;
    }
}

.wh-due-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
    margin-top: 0.4rem;
}

.wh-due-sub {
    font-size: 0.78rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.15rem;
}

.wh-due-preview {
    display: flex;
    align-items: baseline;
    font-size: 0.9rem;
    color: var(--mud-palette-text-primary);
}

/* ── Subscribe CTA panel ── */
.wh-cta {
    border-color: var(--mud-palette-primary);
}

.wh-cta-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: rgba(17, 17, 17, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mud-palette-primary);
    margin-bottom: 0.6rem;
}

.wh-cta-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.wh-cta-copy {
    font-size: 0.85rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 0.3rem;
    line-height: 1.5;
}

.wh-export-copy {
    font-size: 0.85rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.5;
}

/* ── Setup checklist ── */
.wh-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 0.5px solid var(--mud-palette-divider);
    cursor: pointer;
}

    .wh-check:last-child {
        border-bottom: none;
    }

.wh-check-text {
    flex: 1;
    min-width: 0;
}

.wh-check-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}

.wh-check-go {
    color: var(--mud-palette-text-disabled);
}

.wh-check:hover .wh-check-go {
    color: var(--mud-palette-text-secondary);
}

/* ── Load-more ── */
.wh-more {
    text-align: center;
    padding: 0.75rem 0;
}

@media (max-width: 600px) {
    .wh-ribbon-note {
        margin-left: 0;
        width: 100%;
        padding-left: 0;
        padding-top: 0.4rem;
    }

    .wh-ribbon-sep {
        margin: 0 0.4rem;
        width: 16px;
    }
}
