/* ===================================
   READING WORKSPACE (Home)
   Intent-based sections: NOW / NEW / INSIGHTS / DISCOVER / TOOLS
   =================================== */

/* --- Section Eyebrow System --- */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1_5, 6px);
    font-family: var(--font, Inter, sans-serif);
    font-size: var(--section-eyebrow, 0.65rem);
    font-weight: var(--section-eyebrow-weight, 600);
    letter-spacing: var(--section-eyebrow-tracking, 0.08em);
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: var(--space-2);
}
.section-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    flex-shrink: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: var(--heading);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}
.section-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.dash-section {
    margin-bottom: var(--space-10);
}

/* --- Greeting --- */
.greeting {
    margin-bottom: var(--space-6);
    position: relative;
}
.greeting::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    margin-top: var(--space-3);
}
.greeting h1 {
    font-family: var(--font-display);
    font-size: var(--display);
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-display);
    line-height: var(--leading-display);
    color: var(--text-primary);
}
.greeting-stats {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-2);
    font-size: var(--body);
    color: var(--text-muted);
    flex-wrap: wrap;
}
.greeting-stat {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--surface-bg);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    line-height: 1;
}
.greeting-stat strong {
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}
.greeting-stat-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-dim);
}

/* --- Premium Hero Card --- */
.hero-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(ellipse 600px 200px at 0% 0%, var(--accent-primary-subtle) 0%, transparent 70%),
        radial-gradient(ellipse 400px 150px at 100% 100%, var(--accent-violet-subtle) 0%, transparent 70%);
    pointer-events: none;
}

.hero-card > * {
    position: relative;
}

.hero-greeting h1 {
    font-family: var(--font-display);
    font-size: var(--display);
    font-weight: var(--weight-extrabold);
    letter-spacing: var(--tracking-display);
    line-height: var(--leading-display);
    color: var(--text-primary);
    margin: 0;
}

.hero-subtitle {
    font-size: var(--body);
    color: var(--text-secondary);
    margin-top: var(--space-2);
    line-height: var(--leading-relaxed);
}

.hero-divider {
    width: 40px;
    height: 3px;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    margin: var(--space-5) 0;
}

/* --- Reading Snapshot --- */
.hero-snapshot {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.snapshot-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4);
    background: var(--surface-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-smooth), background var(--transition-smooth);
}

.snapshot-card:hover {
    border-color: var(--border-hover);
    background: var(--surface-bg-hover);
}

.snapshot-value {
    font-family: var(--font-display);
    font-size: var(--heading);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.snapshot-label {
    font-size: var(--caption);
    color: var(--text-muted);
    font-weight: var(--weight-medium);
    line-height: 1.3;
}

.snapshot-sub {
    font-size: var(--xs);
    color: var(--text-dim);
    line-height: 1.2;
}

.snapshot-streak .snapshot-value {
    color: var(--accent-gold);
}

.snapshot-streak.streak-active {
    border-color: rgba(255, 215, 0, 0.25);
    background: rgba(255, 215, 0, 0.04);
}

.snapshot-streak.streak-at_risk {
    border-color: rgba(255, 159, 67, 0.25);
    background: rgba(255, 159, 67, 0.04);
}
.snapshot-streak.streak-at_risk .snapshot-value {
    color: var(--accent-orange, #ff9f43);
}
.snapshot-streak.streak-at_risk .snapshot-sub {
    color: var(--accent-orange, #ff9f43);
}

.snapshot-streak.streak-broken {
    border-color: rgba(160, 160, 160, 0.2);
    background: rgba(160, 160, 160, 0.03);
}
.snapshot-streak.streak-broken .snapshot-value {
    color: var(--text-muted);
}
.snapshot-streak.streak-broken .snapshot-sub {
    color: var(--text-dim);
}

.snapshot-streak.streak-none .snapshot-value {
    color: var(--text-dim);
}

.snapshot-updates .snapshot-value {
    color: var(--accent-primary);
}

.snapshot-next .snapshot-value {
    color: var(--accent-violet);
}

/* --- Hero Actions --- */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.hero-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    font-size: var(--caption);
    font-weight: var(--weight-semibold);
    font-family: var(--font);
    line-height: 1;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
    border: none;
}

.hero-action-btn-primary {
    background: var(--gradient-brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 143, 224, 0.25);
}

.hero-action-btn-primary:hover {
    box-shadow: 0 4px 16px rgba(79, 143, 224, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

.hero-action-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.hero-action-btn-secondary:hover {
    background: var(--surface-bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* --- Empty State Hero --- */
.hero-empty {
    text-align: center;
    padding: var(--space-8) var(--space-4);
}

.hero-empty-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-3);
    opacity: 0.6;
}

.hero-empty h2 {
    font-family: var(--font-display);
    font-size: var(--heading);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2);
}

.hero-empty p {
    font-size: var(--body);
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto var(--space-5);
    line-height: var(--leading-relaxed);
}

.hero-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
}

/* --- NOW: Reading Workspace --- */
.ws-section {
    margin-bottom: 0;
}

/* Summary Bar */
.ws-summary-bar {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}
.ws-summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    background: var(--surface-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    min-width: 80px;
}
.ws-summary-value {
    font-family: var(--font-display);
    font-size: var(--body);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ws-summary-label {
    font-size: var(--xs);
    color: var(--text-dim);
    line-height: 1.2;
}
.ws-summary-accent .ws-summary-value {
    color: var(--accent-primary);
}
.ws-summary-success .ws-summary-value {
    color: var(--success);
}
.ws-summary-streak .ws-summary-value {
    color: var(--accent-gold);
}

/* Last Session Banner */
.ws-last-session {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--accent-primary-subtle) 0%, var(--accent-violet-subtle) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    transition: border-color var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.ws-last-session:hover {
    border-color: var(--accent-primary);
}
.ws-last-session-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-primary-subtle);
    color: var(--accent-primary);
}
.ws-last-session-body {
    flex: 1;
    min-width: 0;
}
.ws-last-session-label {
    font-size: var(--xs);
    color: var(--text-muted);
    font-weight: var(--weight-medium);
}
.ws-last-session-title {
    font-size: var(--body);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ws-last-session-action {
    flex-shrink: 0;
}
.ws-last-session-time {
    font-size: var(--xs);
    color: var(--text-dim);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Workspace Layout: Primary + Queue */
.ws-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

/* Primary Card */
.ws-primary {
    display: flex;
    gap: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
    position: relative;
}
.ws-primary:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--glow-accent);
}
.ws-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    background: radial-gradient(ellipse 300px 150px at 0% 0%, var(--accent-primary-subtle) 0%, transparent 70%);
    pointer-events: none;
}
.ws-primary > * {
    position: relative;
}
.ws-primary-cover {
    flex: 0 0 140px;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--surface-bg);
}
.ws-primary-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-smooth);
}
.ws-primary:hover .ws-primary-cover img {
    transform: scale(1.03);
}
.ws-primary-body {
    flex: 1;
    padding: var(--space-4) var(--space-4) var(--space-4) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}
.ws-primary-eyebrow {
    font-size: var(--xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-primary);
}
.ws-primary-title {
    font-size: var(--body);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: var(--leading-tight);
    font-family: var(--font-display);
}
.ws-primary-title a {
    color: var(--text-primary);
    text-decoration: none;
}
.ws-primary-title a:hover {
    color: var(--accent-primary);
}
.ws-primary-meta {
    font-size: var(--caption);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.ws-primary-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: var(--danger);
    color: #fff;
    font-size: var(--xs);
    font-weight: var(--weight-bold);
    line-height: 1.4;
}
.ws-primary-progress {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
}
.ws-primary-track {
    flex: 1;
    max-width: 120px;
    height: 4px;
    border-radius: var(--radius-full);
    background: var(--surface-bg);
    overflow: hidden;
}
.ws-primary-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    transition: width var(--transition-smooth);
}
.ws-primary-label {
    font-size: var(--xs);
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}
.ws-primary-est {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--xs);
    color: var(--text-muted);
}
.ws-primary-est svg {
    flex-shrink: 0;
}
.ws-primary-action {
    align-self: flex-start;
    margin-top: auto;
    padding: var(--space-1) var(--space-4);
    font-size: var(--caption);
    font-weight: var(--weight-semibold);
    line-height: 1;
    height: 30px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: var(--gradient-brand);
    color: #fff;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-smooth);
}
.ws-primary-action:hover {
    box-shadow: 0 4px 16px rgba(79, 143, 224, 0.35);
    transform: translateY(-1px);
    color: #fff;
}

/* Queue List */
.ws-queue {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ws-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
}
.ws-queue-title {
    font-size: var(--caption);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ws-queue-count {
    font-size: var(--xs);
    font-weight: var(--weight-bold);
    color: var(--text-dim);
    background: var(--surface-bg);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    line-height: 1.4;
}
.ws-queue-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    transition: background var(--transition-smooth);
}
.ws-queue-item:hover {
    background: var(--bg-card-hover);
}
.ws-queue-item + .ws-queue-item {
    border-top: 1px solid var(--border);
}
.ws-queue-cover {
    width: 28px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-bg);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.ws-queue-body {
    flex: 1;
    min-width: 0;
}
.ws-queue-item-title {
    font-size: var(--caption);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ws-queue-item-meta {
    font-size: var(--xs);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: 1px;
}
.ws-queue-item-unread {
    color: var(--accent-primary);
    font-weight: var(--weight-semibold);
}
.ws-queue-chevron {
    flex-shrink: 0;
    color: var(--text-dim);
}
.ws-queue-more {
    display: block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--caption);
    font-weight: var(--weight-medium);
    color: var(--accent-primary);
    text-align: center;
    text-decoration: none;
    border-top: 1px solid var(--border);
    transition: background var(--transition-smooth);
}
.ws-queue-more:hover {
    background: var(--bg-card-hover);
}
.ws-queue-empty {
    padding: var(--space-6) var(--space-4);
    text-align: center;
    font-size: var(--caption);
    color: var(--text-dim);
}

/* Empty State */
.ws-empty {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    background: var(--gradient-subtle);
    text-align: center;
}
.ws-empty-icon {
    font-size: 2rem;
    opacity: 0.5;
}
.ws-empty-title {
    font-size: var(--body);
    font-weight: var(--weight-semibold);
    color: var(--text-muted);
}
.ws-empty-desc {
    font-size: var(--caption);
    color: var(--text-dim);
    margin-bottom: var(--space-2);
}

/* --- NEW: Recent Updates --- */
.updates-section {
    margin-bottom: 0;
}
.updates-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--border);
}
.update-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    text-decoration: none;
    transition: background var(--transition-smooth);
}
.update-item:first-child {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.update-item:last-child {
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.update-item:only-child {
    border-radius: var(--radius-xl);
}
.update-item:hover {
    background: var(--bg-card-hover);
}

.update-cover {
    width: 32px;
    height: 46px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--surface-bg);
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.update-body {
    flex: 1;
    min-width: 0;
}
.update-title {
    font-size: var(--body);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.update-detail {
    font-size: var(--caption);
    color: var(--text-muted);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.update-detail-new {
    color: var(--accent-primary);
    font-weight: var(--weight-semibold);
}
.update-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}
.update-time {
    font-size: var(--xs);
    color: var(--text-dim);
    white-space: nowrap;
}
.update-empty {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-dim);
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
    font-size: var(--body);
}

/* --- INSIGHTS: Metric Cards --- */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-3);
}
.insight-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.insight-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}
.insight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}
.insight-card-accent-brand::before { background: var(--gradient-brand); }
.insight-card-accent-success::before { background: var(--success); }
.insight-card-accent-warning::before { background: var(--warning); }
.insight-card-accent-violet::before { background: var(--accent-violet); }
.insight-card-accent-gold::before { background: var(--accent-gold); }

.insight-value {
    font-family: var(--font-display);
    font-size: var(--display);
    font-weight: var(--weight-extrabold);
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: var(--tracking-tight);
    font-variant-numeric: tabular-nums;
}
.insight-label {
    font-size: var(--caption);
    color: var(--text-muted);
    font-weight: var(--weight-medium);
}
.insight-sub {
    font-size: var(--xs);
    color: var(--text-dim);
    margin-top: var(--space-1);
}

/* --- DISCOVER: Recommendations --- */
.recs-section {
    margin-bottom: 0;
}
.recs-scroll {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.recs-scroll::-webkit-scrollbar {
    height: 3px;
}
.recs-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.recs-scroll::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 2px;
}

.rec-card {
    flex: 0 0 150px;
    scroll-snap-align: start;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth), transform var(--transition-smooth);
}
.rec-card:hover {
    border-color: var(--accent-primary-subtle);
    box-shadow: var(--shadow-lg), var(--glow-accent);
    transform: translateY(-2px);
}
.rec-card-cover {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    background: var(--surface-bg);
}
.rec-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rec-card-body {
    padding: var(--space-2) var(--space-3) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    flex: 1;
}
.rec-card-title {
    font-size: var(--caption);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: var(--leading-tight);
    text-decoration: none;
}
.rec-card-title:hover {
    color: var(--accent-primary);
}
.rec-card-author {
    font-size: var(--xs);
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rec-card-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}
.rec-card-reason {
    font-size: 0.6rem;
    padding: 0.08rem 0.35rem;
    border-radius: var(--radius-full);
    background: var(--accent-primary-subtle);
    color: var(--accent-primary);
    border: 1px solid rgba(79, 143, 224, 0.15);
    white-space: nowrap;
    line-height: 1.4;
}
.rec-card-match {
    font-size: 0.6rem;
    padding: 0.08rem 0.35rem;
    border-radius: var(--radius-full);
    background: var(--accent-violet-subtle);
    color: var(--accent-violet);
    border: 1px solid rgba(124, 92, 191, 0.15);
    white-space: nowrap;
    line-height: 1.4;
}
.rec-card-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: auto;
    padding-top: var(--space-1);
}

.btn-rec-track {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0.15rem 0.5rem;
    font-size: 0.65rem;
    font-weight: var(--weight-semibold);
    font-family: var(--font);
    line-height: 1.4;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-rec-track:hover {
    filter: brightness(1.15);
    box-shadow: 0 0 10px rgba(79, 184, 133, 0.35);
}
.btn-rec-track svg {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-rec-track:hover svg {
    transform: scale(1.2);
}

.btn-rec-feedback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 0.6rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
}
.btn-rec-feedback:hover {
    background: var(--surface-bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* --- TOOLS: Quick Actions --- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}
.tool-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.tool-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}
.tool-card-primary {
    grid-column: 1 / -1;
}
.tool-card-accent {
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-violet));
    flex-shrink: 0;
}
.tool-card-body {
    padding: var(--space-5) var(--space-6);
}
.tool-card-head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.tool-icon {
    color: var(--accent-primary);
    flex-shrink: 0;
    opacity: 0.8;
}
.tool-card-label {
    font-family: var(--font-display);
    font-size: var(--body);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    line-height: var(--leading-tight);
}
.tool-card-desc {
    font-size: var(--caption);
    color: var(--text-muted);
    margin-top: var(--space-1);
}
.tool-input-row {
    display: flex;
    gap: var(--space-2);
}
.tool-input-row-sm {
    margin-top: var(--space-2);
}
.tool-url-input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--body);
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition);
}
.tool-url-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary-subtle);
}
.tool-track-btn {
    flex-shrink: 0;
}
.smart-import-status {
    margin-top: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--body-small);
    transition: opacity var(--transition);
}
.smart-import-ok {
    color: var(--accent-success);
    background: var(--accent-success-subtle);
}
.smart-import-err {
    color: var(--accent-danger);
    background: var(--accent-danger-subtle);
}
.tool-card-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-3);
    cursor: pointer;
    text-decoration: none;
    min-height: 100px;
}
.tool-card-compact .tool-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: color var(--transition);
}
.tool-card-compact:hover .tool-icon {
    color: var(--accent-primary);
    opacity: 1;
}
.tool-card-label-sm {
    font-size: var(--caption);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    transition: color var(--transition);
}
.tool-card-compact:hover .tool-card-label-sm {
    color: var(--text-primary);
}
.tool-card-kbd {
    font-family: var(--font-mono);
    font-size: var(--xs);
    color: var(--text-dim);
    padding: 2px 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.tool-card button {
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* --- Focus Mode --- */
/* --- Focus Mode --- */
.focus-mode .updates-section { display: none; }
.focus-mode .insights-section { display: none; }
.focus-mode .recs-section { display: none; }
.focus-mode .quick-actions-tools { display: none; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .greeting {
        margin-bottom: var(--space-4);
    }
    .greeting h1 {
        font-size: var(--heading);
    }
    .greeting-stats {
        font-size: var(--caption);
        gap: var(--space-2);
    }
    .ws-layout {
        grid-template-columns: 1fr;
    }
    .ws-primary {
        flex-direction: column;
    }
    .ws-primary-cover {
        flex: none;
        width: 100%;
        aspect-ratio: 3/4;
        max-height: 200px;
    }
    .ws-primary-body {
        padding: 0 var(--space-4) var(--space-4);
    }
    .ws-primary-action {
        margin-top: var(--space-2);
    }
    .ws-last-session {
        flex-wrap: wrap;
    }
    .ws-last-session-time {
        width: 100%;
        text-align: right;
    }
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .insight-value {
        font-size: var(--heading);
    }
    .rec-card {
        flex: 0 0 120px;
    }
    .dash-section {
        margin-bottom: var(--space-6);
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .tool-card-compact {
        flex-direction: row;
        justify-content: flex-start;
        padding: var(--space-4) var(--space-5);
        min-height: auto;
    }
    .hero-card {
        padding: var(--space-5);
    }
    .hero-greeting h1 {
        font-size: var(--heading);
    }
    .hero-snapshot {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-action-btn {
        justify-content: center;
    }
}
