:root {
    --ucsc-blue: #003c6c;
    --ucsc-blue-light: #e8f0f7;
    --ucsc-gold: #f29813;
    --ucsc-gold-light: #fef3c7;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --transition-fast: 0.15s ease;
}

body {
    background-color: #f5f7fa;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Navbar */
.navbar {
    background-color: var(--ucsc-blue) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Buttons */
.btn-primary {
    background-color: var(--ucsc-blue);
    border-color: var(--ucsc-blue);
    transition: all var(--transition-fast);
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
    background-color: #002d52;
    border-color: #002d52;
    box-shadow: 0 2px 8px rgba(0, 60, 108, 0.3);
}
.btn-outline-primary {
    color: var(--ucsc-blue);
    border-color: var(--ucsc-blue);
    transition: all var(--transition-fast);
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--ucsc-blue);
    border-color: var(--ucsc-blue);
    box-shadow: 0 2px 8px rgba(0, 60, 108, 0.2);
}

/* Cards */
.card {
    border-radius: 0.625rem;
    transition: box-shadow var(--transition-fast);
}

/* Form focus */
.form-control:focus, .form-check-input:focus {
    border-color: var(--ucsc-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 60, 108, 0.15);
}
.form-check-input:checked {
    background-color: var(--ucsc-blue);
    border-color: var(--ucsc-blue);
}

/* Upload zone */
.upload-zone {
    border: 2px dashed #ced4da;
    border-radius: 0.625rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: #fafbfc;
}
.upload-zone:hover {
    border-color: var(--ucsc-blue);
    background-color: var(--ucsc-blue-light);
}

/* Course selection cards */
.cursor-pointer { cursor: pointer; }
label.list-group-item {
    transition: all var(--transition-fast);
}
label.list-group-item:has(input:checked) {
    border-color: var(--ucsc-blue) !important;
    background-color: var(--ucsc-blue-light);
}

/* Mode pills */
.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: 2rem;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.mode-pill:hover {
    border-color: var(--ucsc-blue);
    color: var(--ucsc-blue);
    background: var(--ucsc-blue-light);
}
.mode-pill.active {
    background-color: var(--ucsc-blue);
    border-color: var(--ucsc-blue);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 60, 108, 0.25);
}

/* Coaching section cards */
.section-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.section-icon.complete {
    background-color: #d1fae5;
    color: #059669;
}
.section-icon.active {
    background-color: var(--ucsc-blue-light);
    color: var(--ucsc-blue);
}

/* Animations */
.fade-up {
    animation: fadeUp 0.3s ease-out forwards;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* HTMX indicator */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }

/* Activity feed */
#activity-feed {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    padding: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}
#activity-feed:empty { display: none; }
.activity-item {
    border-radius: 0.25rem;
}
.activity-item + .activity-item {
    border-top: 1px solid #f0f0f0;
}

/* Coaching output markdown */
.coach-output h4 { margin-top: 0; }
.coach-output ul { padding-left: 1.25rem; }
.coach-output li { margin-bottom: 0.35rem; }
.coach-output p { margin-bottom: 0.6rem; }
.coach-output strong { color: #1a1a1a; }
.coach-output blockquote {
    border-left: 3px solid var(--ucsc-gold);
    padding-left: 1rem;
    color: #555;
    margin-left: 0;
    font-style: normal;
}

/* Sidebar */
.workbench-sidebar {
    width: 250px;
    min-height: calc(100vh - 56px);
    background: #fff;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.workbench-sidebar .nav-link {
    color: #4b5563;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
    margin: 0.15rem 0.5rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}
.workbench-sidebar .nav-link:hover {
    background-color: var(--ucsc-blue-light);
    color: var(--ucsc-blue);
}
.workbench-sidebar .nav-link.active {
    background-color: var(--ucsc-blue);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 60, 108, 0.2);
}
.workbench-sidebar .badge {
    font-size: 0.7rem;
    font-weight: 600;
}
.workbench-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Guest banner */
.guest-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
}

/* Dashboard cards */
.dash-card {
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.dash-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.dash-card:hover h5, .dash-card:hover .h5 { color: var(--ucsc-blue); }

/* Focus-visible outlines */
.btn:focus-visible, .nav-link:focus-visible, .mode-pill:focus-visible, .form-control:focus-visible {
    outline: 2px solid var(--ucsc-blue);
    outline-offset: 2px;
}

/* Auth pages */
.auth-card {
    max-width: 420px;
    margin: 0 auto;
}

/* List group items in workbench */
.list-group-item-action {
    transition: all var(--transition-fast);
}

/* Responsive sidebar */
@media (max-width: 991px) {
    .workbench-sidebar {
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.5rem 0 !important;
    }
    .workbench-sidebar .nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
        gap: 0.25rem;
        padding: 0 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .workbench-sidebar .nav::-webkit-scrollbar { display: none; }
    .workbench-sidebar .nav-item {
        flex: none;
    }
    .workbench-sidebar .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
        margin: 0;
        white-space: nowrap;
        min-height: 40px;
        display: flex;
        align-items: center;
    }
    .workbench-sidebar .nav-link .badge { display: none; }
    /* Hide section headers on mobile */
    .workbench-sidebar .px-3.mb-2,
    .workbench-sidebar .px-3.mb-3 {
        display: none;
    }
    .workbench-sidebar .nav-item.mt-3 {
        margin-top: 0 !important;
    }
    .workbench-layout {
        flex-direction: column !important;
    }
}

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Badge on nav links */
.workbench-sidebar .nav-link .badge {
    margin-left: auto;
}

/* ── Resume Editor ── */
.resume-toolbar {
    position: sticky;
    top: 0;
    background: #f5f7fa;
    z-index: 10;
    padding: 0.5rem 0;
}
.resume-editor {
    max-width: 800px;
}
.resume-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: box-shadow var(--transition-fast);
    overflow: hidden;
}
.resume-section:hover {
    box-shadow: var(--shadow-sm);
}
.resume-section:focus-within {
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Type dot — colored indicator */
.resume-type-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.resume-type-dot[data-type="experience"] { background: var(--ucsc-blue); }
.resume-type-dot[data-type="project"] { background: #059669; }
.resume-type-dot[data-type="education"] { background: #0284c7; }
.resume-type-dot[data-type="skills"] { background: #7c3aed; }

/* Section colored top border */
.resume-section[data-element-type="experience"] { border-top: 3px solid var(--ucsc-blue); }
.resume-section[data-element-type="project"] { border-top: 3px solid #059669; }
.resume-section[data-element-type="education"] { border-top: 3px solid #0284c7; }
.resume-section[data-element-type="skills"] { border-top: 3px solid #7c3aed; }

.resume-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
}
.resume-section-actions {
    display: flex; align-items: center; gap: 2px; opacity: 0.4;
    transition: opacity var(--transition-fast);
}
.resume-section:hover .resume-section-actions { opacity: 1; }

.resume-section-body {
    padding: 0 0.75rem 0.75rem;
}

/* Inline inputs — borderless, look like editable text */
.resume-title-input {
    border: none; background: transparent; outline: none;
    font-size: 0.95rem; width: 100%; padding: 0.15rem 0.25rem;
    border-radius: 0.25rem;
    transition: background var(--transition-fast);
}
.resume-title-input:hover { background: #f8fafc; }
.resume-title-input:focus {
    background: #fff; box-shadow: 0 0 0 2px rgba(0, 60, 108, 0.12);
}

.resume-subtitle-input {
    border: none; background: transparent; outline: none;
    font-size: 0.82rem; color: #6b7280; width: 100%; padding: 0.1rem 0.25rem;
    border-radius: 0.25rem; margin-bottom: 0.25rem;
    transition: background var(--transition-fast);
}
.resume-subtitle-input:hover { background: #f8fafc; }
.resume-subtitle-input:focus {
    background: #fff; box-shadow: 0 0 0 2px rgba(0, 60, 108, 0.08); color: #374151;
}
.resume-subtitle-input::placeholder { color: #d1d5db; }

/* Source tags */
.resume-source-tags { margin-bottom: 0.5rem; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.resume-tag {
    font-size: 0.65rem; padding: 0.15rem 0.4rem; border-radius: 0.25rem;
    font-weight: 500; letter-spacing: 0.02em;
}
.resume-tag.course { background: #fef3c7; color: #92400e; }
.resume-tag.project { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Content area (skills) */
.resume-content-area {
    border: none; background: transparent; outline: none; resize: none;
    font-size: 0.85rem; width: 100%; padding: 0.25rem;
    border-radius: 0.25rem; line-height: 1.6;
    transition: background var(--transition-fast);
}
.resume-content-area:focus {
    background: #fff; box-shadow: 0 0 0 2px rgba(0, 60, 108, 0.08);
}

/* Bullets */
.resume-bullets { padding-left: 0.25rem; }
.resume-bullet {
    display: flex; align-items: flex-start; gap: 0.5rem;
    padding: 0.3rem 0.15rem; border-radius: 0.25rem;
    transition: background var(--transition-fast);
}
.resume-bullet:hover { background: #f8fafc; }
.bullet-marker {
    color: #9ca3af; font-size: 0.7rem; margin-top: 0.45rem; flex-shrink: 0;
    user-select: none;
}
.resume-bullet-text {
    border: none; background: transparent; outline: none; resize: none;
    font-size: 0.85rem; line-height: 1.55; flex-grow: 1;
    padding: 0.1rem 0.25rem; border-radius: 0.25rem;
    overflow: hidden; /* for auto-grow */
    transition: background var(--transition-fast);
}
.resume-bullet-text:focus {
    background: #fff; box-shadow: 0 0 0 2px rgba(0, 60, 108, 0.08);
}
.resume-bullet-text::placeholder { color: #d1d5db; }

/* Bullet actions — show on hover */
.bullet-actions {
    display: flex; align-items: center; gap: 2px; flex-shrink: 0;
    opacity: 0; transition: opacity var(--transition-fast);
}
.resume-bullet:hover .bullet-actions,
.resume-bullet:focus-within .bullet-actions { opacity: 1; }

/* Icon buttons */
.btn-icon {
    background: none; border: none; padding: 0.2rem 0.35rem; cursor: pointer;
    color: #9ca3af; border-radius: 0.25rem; font-size: 0.8rem;
    transition: all var(--transition-fast); line-height: 1;
}
.btn-icon:hover { background: #f3f4f6; color: #374151; }
.btn-icon.text-danger:hover { background: #fef2f2; color: #dc2626; }

.btn-icon-sm {
    background: none; border: none; padding: 0.15rem 0.25rem; cursor: pointer;
    color: #9ca3af; border-radius: 0.25rem; font-size: 0.7rem;
    transition: all var(--transition-fast); line-height: 1;
}
.btn-icon-sm:hover { background: #f3f4f6; color: var(--ucsc-blue); }
.btn-icon-sm.text-danger:hover { background: #fef2f2; color: #dc2626; }

/* Add bullet button */
.resume-add-bullet {
    background: none; border: 1px dashed #e5e7eb; color: #9ca3af;
    padding: 0.3rem 0.6rem; font-size: 0.78rem; cursor: pointer;
    border-radius: 0.25rem; display: block; width: 100%; text-align: left;
    margin-top: 0.35rem; transition: all var(--transition-fast);
}
.resume-add-bullet:hover {
    border-color: var(--ucsc-blue); color: var(--ucsc-blue); background: #f8fafc;
}


/* ── Research Bands Layout ── */
.research-band { position: relative; }
.research-band-accent {
    width: 4px; min-height: 100%; border-radius: 2px; flex-shrink: 0;
}
.band-summary { line-height: 1.55; color: #4b5563; }

.research-subcard {
    background: #fff; border: 1px solid #e5e7eb; border-left: 3px solid #dee2e6;
    border-radius: 0.5rem; overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.research-subcard:hover { box-shadow: var(--shadow-md); }
.subcard-header {
    padding: 0.5rem 0.75rem; font-size: 0.85rem; font-weight: 600;
    color: #1f2937; border-bottom: 1px solid #f3f4f6; background: #fafbfc;
}
.subcard-body { padding: 0.6rem 0.75rem; }
.subcard-keypoint {
    font-size: 0.8rem; font-weight: 600; color: var(--ucsc-blue);
    margin-bottom: 0.4rem; line-height: 1.4;
}
.subcard-text { font-size: 0.8rem; color: #4b5563; line-height: 1.5; margin-bottom: 0.4rem; }
.subcard-detail {
    font-size: 0.78rem; color: #374151; padding: 0.2rem 0 0.2rem 0.75rem;
    position: relative; line-height: 1.4;
}
.subcard-detail-dot {
    position: absolute; left: 0; top: 0.55rem;
    width: 4px; height: 4px; border-radius: 50%; background: #9ca3af;
}
.subcard-agent {
    font-size: 0.72rem; color: #6b7280; padding: 0.15rem 0;
    display: flex; align-items: center; gap: 0.4rem;
}
.subcard-agents:empty { display: none; }
.subcard-finding {
    font-size: 0.78rem; color: #1f2937; padding: 0.25rem 0 0.25rem 0.75rem;
    position: relative; line-height: 1.4; border-left: 2px solid #d1fae5; margin-bottom: 0.25rem;
}
.subcard-finding-deep { border-left-color: #e0e7ff; }
.subcard-findings:empty { display: none; }
.subcard-source-list {
    padding-top: 0.4rem; margin-top: 0.4rem; border-top: 1px solid #f3f4f6;
    display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem;
}
.subcard-source-list a {
    font-size: 0.68rem; color: #6b7280; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.25rem;
    transition: color var(--transition-fast);
}
.subcard-source-list a:hover { color: var(--ucsc-blue); }
.subcard-source-list a .bi { font-size: 0.6rem; }
.subcard-sources:empty { display: none; }
.subcard-deeper:empty { display: none; }
.subcard-deeper { padding-top: 0.4rem; margin-top: 0.4rem; }
.subcard-deeper-btn {
    display: block; width: 100%; padding: 0.3rem; font-size: 0.72rem;
    color: #6b7280; background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 0.25rem; cursor: pointer; text-align: center;
    transition: all var(--transition-fast);
}
.subcard-deeper-btn:hover { background: #f3f4f6; color: var(--ucsc-blue); border-color: var(--ucsc-blue); }
.subcard-deeper-btn.done { color: #059669; border-color: #d1fae5; background: #f0fdf4; cursor: default; }

/* Suggestion cards */
.suggestion-card {
    transition: opacity var(--transition-fast);
}
.bullet-suggestion {
    transition: background var(--transition-fast);
    border-radius: 0.25rem;
    padding: 0.5rem;
}
.bullet-suggestion:hover {
    background: #f8f9fa;
}

/* ── Resume Builder ── */
.library-card {
    transition: opacity var(--transition-fast), box-shadow var(--transition-fast);
}
.library-card:hover { box-shadow: var(--shadow-sm); }
.library-card .library-add-btn {
    transition: opacity var(--transition-fast);
}
.library-card.on-canvas {
    opacity: 0.35;
    pointer-events: none;
}
.library-card.on-canvas .library-add-btn { display: none; }
.canvas-card {
    border-left: 3px solid var(--ucsc-blue) !important;
}
.canvas-card .drag-handle {
    cursor: grab;
    border-radius: 0.25rem;
    transition: background var(--transition-fast);
}
.canvas-card .drag-handle:hover { background: #f3f4f6; }
.canvas-card .drag-handle:active { cursor: grabbing; background: #e5e7eb; }
.sortable-ghost {
    opacity: 0.3;
    background: var(--ucsc-blue-light) !important;
}
.sortable-chosen {
    box-shadow: var(--shadow-md);
}
.canvas-bullet-excluded {
    opacity: 0.35;
}
.canvas-bullet-excluded textarea {
    text-decoration: line-through;
}
#canvas-empty {
    border: 2px dashed #dee2e6;
    border-radius: 0.625rem;
    padding: 3rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}
#canvas-list:not(:empty) + #canvas-empty {
    display: none;
}
.canvas-bullet textarea {
    resize: none;
    font-size: 0.8rem;
}

/* Dashboard card links */
a.dash-card-link { text-decoration: none; color: inherit; }
a.dash-card-link:hover { color: inherit; }

/* Research Dashboard */
.research-brief {
    border-left: 4px solid var(--ucsc-blue) !important;
    background: linear-gradient(135deg, var(--ucsc-blue-light), #f8fafc);
}
.research-dash-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    height: 100%;
    transition: box-shadow var(--transition-fast);
}
.research-dash-card:hover {
    box-shadow: var(--shadow-sm);
}
.dash-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.35rem;
}
.dash-card-kp {
    font-size: 0.78rem;
    color: #4b5563;
    line-height: 1.45;
    margin-bottom: 0.5rem;
}
.dash-card-action {
    font-size: 0.72rem;
    color: var(--ucsc-blue);
    font-weight: 500;
}

/* Research Main Tabs */
.research-main-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}
.research-main-tabs::-webkit-scrollbar { display: none; }
.research-main-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.research-main-tab:hover {
    color: var(--ucsc-blue);
    background: #f8fafc;
}
.research-main-tab.active {
    color: var(--ucsc-blue);
    border-bottom-color: var(--ucsc-blue);
}
.research-panel {
    padding-top: 1rem;
}
/* Band-specific panel tinting */
.research-panel[data-panel="industry"] { background: #f0f7ff; border-radius: 0 0 0.5rem 0.5rem; padding: 1rem; }
.research-panel[data-panel="company"] { background: #f0faf4; border-radius: 0 0 0.5rem 0.5rem; padding: 1rem; }
.research-panel[data-panel="people"] { background: #fef7ed; border-radius: 0 0 0.5rem 0.5rem; padding: 1rem; }
.research-panel[data-panel="role"] { background: #f5f0ff; border-radius: 0 0 0.5rem 0.5rem; padding: 1rem; }
.research-panel[data-panel="dashboard"] { padding-top: 1rem; }

.research-section {
    background: rgba(255,255,255,0.7);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}
.research-section:last-child {
    margin-bottom: 0;
}
.research-section h6 {
    color: #1f2937;
    margin-bottom: 0.75rem;
}
.research-section-content {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #374151;
}
.research-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}
.research-section-link {
    font-size: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    transition: all var(--transition-fast);
}
.research-section-link:hover {
    background: var(--ucsc-blue-light);
    color: var(--ucsc-blue);
}
.research-source-link {
    font-size: 0.7rem;
    color: #6b7280;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.research-source-link:hover {
    color: var(--ucsc-blue);
}

/* Research content formatting */
.research-keypoint {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
[data-panel="industry"] .research-keypoint { color: #1d4ed8; }
[data-panel="company"] .research-keypoint { color: #15803d; }
[data-panel="people"] .research-keypoint { color: #c2410c; }
[data-panel="role"] .research-keypoint { color: #7c3aed; }
.research-body {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}
.research-details {
    margin-bottom: 0.5rem;
}
.research-detail-item {
    font-size: 0.82rem;
    color: #4b5563;
    padding: 0.3rem 0 0.3rem 0.75rem;
    border-left: 2px solid #cbd5e1;
    margin-bottom: 0.35rem;
    line-height: 1.5;
}
/* Band-colored detail borders */
[data-panel="industry"] .research-detail-item { border-left-color: #93c5fd; }
[data-panel="company"] .research-detail-item { border-left-color: #86efac; }
[data-panel="people"] .research-detail-item { border-left-color: #fed7aa; }
[data-panel="role"] .research-detail-item { border-left-color: #c4b5fd; }
.research-findings-block {
    border-top: 1px solid #f0f0f0;
    padding-top: 0.75rem;
}
.research-finding {
    font-size: 0.82rem;
    color: #1f2937;
    padding: 0.3rem 0 0.3rem 0.75rem;
    border-left: 2px solid #bbf7d0;
    margin-bottom: 0.35rem;
    line-height: 1.5;
}

/* Research progress bar */
.research-progress-bar {
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.research-progress-fill {
    height: 100%;
    background: var(--ucsc-blue);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Research agent indicators */
.research-agents {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 0.375rem;
}
.research-agent-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.75rem;
    color: #6b7280;
}

/* ── Print Styles ── */
@media print {
    .navbar, .workbench-sidebar, footer,
    .btn, button, .mode-pill, .alert,
    #activity-feed, .research-main-tabs,
    .d-flex.gap-2.justify-content-center,
    .subcard-deeper-btn, .research-agents {
        display: none !important;
    }
    body {
        background: #fff;
        font-size: 11pt;
        color: #000;
    }
    .workbench-content {
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    .card-header {
        border-bottom: 1px solid #ccc !important;
        background: none !important;
    }
    .coach-output, .research-section-content {
        font-size: 10pt;
        line-height: 1.5;
    }
    a { color: #000; text-decoration: none; }
    a[href]::after { content: none; }
    .canvas-card {
        border-left: 2px solid #000 !important;
        page-break-inside: avoid;
    }
    pre {
        white-space: pre-wrap;
        font-size: 9pt;
    }
}

/* Mobile: content padding and touch targets */
@media (max-width: 767px) {
    .workbench-content { padding: 0.75rem !important; }
    .element-card .btn-link, .canvas-card .btn-link, .research-subcard .btn {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    /* Research tabs: bigger touch targets */
    .research-main-tab {
        padding: 0.65rem 1rem;
        font-size: 0.82rem;
        min-height: 44px;
    }
    /* Deeper button: bigger and higher contrast */
    .subcard-deeper-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
    /* Toast: bottom of screen on mobile */
    #toast-container {
        top: auto !important;
        bottom: 20px !important;
        right: 12px !important;
        left: 12px !important;
        max-width: none !important;
    }
    /* Builder: swap stacking (canvas first, library second on mobile) */
    .builder-library { order: 2; }
    .builder-canvas { order: 1; }
    /* Target page: taller textareas on mobile */
    #resume_text, #job_posting_text { min-height: 80px; }
    /* Resume editor: always show section actions on mobile (no hover) */
    .resume-section-actions { opacity: 1 !important; }
    .bullet-actions { opacity: 1 !important; }
    /* Builder: Add buttons always visible (no hover on touch) */
    .library-card .library-add-btn { opacity: 1 !important; }
    /* Research section links: bigger touch targets */
    .research-section-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }
    .research-source-link {
        padding: 0.3rem 0.4rem;
        font-size: 0.75rem;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
    }
    /* Research panels: less padding on mobile */
    .research-panel[data-panel="industry"],
    .research-panel[data-panel="company"],
    .research-panel[data-panel="people"],
    .research-panel[data-panel="role"] {
        padding: 0.65rem;
    }
    /* Form controls: readable on mobile */
    .form-control-sm { font-size: 0.9rem !important; }
    /* Dashboard cards full width on mobile */
    .research-dash-card { font-size: 0.85rem; }
}
