/* Cadence section and phase/queue card — ported from the prototype.
   Class names get the tl- prefix because Bootstrap loads before tideline.css
   in the production stack and bare names like .prof collide. */

.list-row.tl-cad-row {
    display: block;
    padding-top: 16px;
    padding-bottom: 18px;
}

/* Shared inline cost meta (used by both presentations) */
.tl-cad-cost {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--fg-1);
    font-feature-settings: 'tnum' 1;
}

    .tl-cad-cost b {
        font-weight: 600;
        color: var(--fg-1);
    }

.tl-cad-cost-sub {
    font-size: 12px;
    color: var(--fg-2);
    margin-top: 4px;
    line-height: 1.5;
}

.tl-cad-link {
    color: var(--ink-700);
    border-bottom: 1px dashed var(--ink-300);
    text-decoration: none;
    cursor: pointer;
}

    .tl-cad-link:hover {
        border-bottom-style: solid;
    }

.tl-cad-note {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fg-2);
    background: var(--surface-1);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* "Current" tag inside a selected profile card */
.tl-cad-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.tl-cad-tag-gold {
    color: var(--gold-700);
    background: var(--accent-soft);
    border: 1px solid var(--gold-300);
}

.tl-cad-tag-moss {
    color: var(--moss-700);
    background: var(--gain-bg);
    border: 1px solid var(--moss-300);
}

.tl-cad-tag-neutral {
    color: var(--fg-2);
    background: var(--sand-200);
    border: 1px solid var(--border);
}

/* Slider ("custom interval" picker) */
.tl-cad-stage {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 20px;
}

.tl-cad-slider {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: end;
    padding: 6px 0 14px;
}

.tl-cad-rail {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 16px;
    height: 3px;
    background: var(--ink-100);
    border-radius: 999px;
    z-index: 0;
}

.tl-cad-rail-fill {
    height: 100%;
    background: var(--ink-800);
    border-radius: 999px;
    transition: width 160ms var(--ease);
}

.tl-cad-stop {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: none;
    padding: 4px 0;
    cursor: pointer;
    font-family: inherit;
}

.tl-cad-stop-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface-1);
    border: 2px solid var(--ink-200);
    transition: all 160ms var(--ease);
}

.tl-cad-stop:hover .tl-cad-stop-dot {
    border-color: var(--ink-400);
}

.tl-cad-stop.active .tl-cad-stop-dot {
    background: var(--ink-800);
    border-color: var(--ink-800);
    box-shadow: 0 0 0 4px rgba(14,42,51,0.08);
}

.tl-cad-stop-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fg-2);
}

.tl-cad-stop.active .tl-cad-stop-label {
    color: var(--fg-1);
    font-weight: 500;
}

.tl-cad-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
    gap: 16px;
}

/* Profile tiles */
.tl-prof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.tl-prof {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

    .tl-prof:hover {
        border-color: var(--border-strong);
    }

.tl-prof-active {
    box-shadow: 0 0 0 1.5px var(--ink-800) inset;
    background: var(--surface-1);
}

    .tl-prof-active.tl-prof-gold {
        box-shadow: 0 0 0 1.5px var(--gold-500) inset;
        background: var(--accent-soft);
    }

    .tl-prof-active.tl-prof-moss {
        box-shadow: 0 0 0 1.5px var(--moss-500) inset;
        background: var(--gain-bg);
    }

.tl-prof-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tl-prof-rad {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--fg-3);
    flex-shrink: 0;
    background: var(--surface-1);
    transition: all 160ms var(--ease);
}

    .tl-prof-rad.on {
        border-color: var(--ink-800);
        background: var(--ink-800);
        box-shadow: inset 0 0 0 3px var(--surface-1);
    }

.tl-prof-active.tl-prof-gold .tl-prof-rad.on {
    border-color: var(--gold-500);
    background: var(--gold-500);
    box-shadow: inset 0 0 0 3px var(--accent-soft);
}

.tl-prof-active.tl-prof-moss .tl-prof-rad.on {
    border-color: var(--moss-500);
    background: var(--moss-500);
    box-shadow: inset 0 0 0 3px var(--gain-bg);
}

.tl-prof-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-1);
}

.tl-prof-sub {
    font-size: 11.5px;
    color: var(--fg-2);
    margin-top: 2px;
}

.tl-prof-detail {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg-1);
    margin-top: auto;
}

.tl-prof-cost {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fg-2);
    line-height: 1.5;
}

@media (max-width: 880px) {
    .tl-prof-grid {
        grid-template-columns: 1fr;
    }
}

.tl-cad-custom-reveal {
    margin-top: 14px;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.tl-cad-custom-eyebrow {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-2);
    margin-bottom: 4px;
}

.tl-cad-stage-embedded {
    background: transparent;
    border: none;
    padding: 4px 0 0;
}

.tl-cad-autoswitch-note {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--fg-2);
    line-height: 1.5;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    max-width: 540px;
}

.tl-cad-autoswitch-note b {
    font-weight: 500;
    color: var(--fg-1);
}

/* Phase card on the Research Loop overview */
.tl-phase-card {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 18px;
}

.tl-phase-gold {
    background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface-1) 80%);
    border-color: var(--gold-300);
}

.tl-phase-moss {
    background: linear-gradient(180deg, var(--gain-bg) 0%, var(--surface-1) 80%);
    border-color: var(--moss-300);
}

.tl-phase-throttled {
    border-color: var(--gold-500);
    box-shadow: inset 0 0 0 1px var(--gold-300);
}

.tl-phase-l {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.tl-phase-r {
    display: flex;
    align-items: stretch;
    min-width: 0;
}

    .tl-phase-r > * {
        width: 100%;
    }

.tl-phase-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.tl-phase-h {
    font-family: var(--font-sans);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--fg-1);
    margin: 4px 0 0;
}

.tl-phase-body {
    font-size: 13.5px;
    color: var(--fg-2);
    line-height: 1.6;
    max-width: 56ch;
    margin: 0;
}

    .tl-phase-body b {
        color: var(--fg-1);
        font-weight: 500;
    }

.tl-phase-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.tl-phase-link {
    font-size: 12.5px;
    color: var(--ink-700);
    cursor: pointer;
    border-bottom: 1px dashed var(--ink-300);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .tl-phase-link:hover {
        border-bottom-style: solid;
    }

@media (max-width: 980px) {
    .tl-phase-card {
        grid-template-columns: 1fr;
    }
}

/* Paper queue */
.tl-pq {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.tl-pq.tl-pq-full {
    border-color: var(--gold-300);
    background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface-1) 80%);
}

.tl-pq-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tl-pq-eye {
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-2);
}

.tl-pq-count {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--fg-1);
    margin-left: auto;
}

    .tl-pq-count b {
        font-weight: 600;
        font-size: 14px;
    }

.tl-pq-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tl-pq-slot {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
}

.tl-pq-slot-busy {
    border-color: var(--moss-300);
}

.tl-pq-slot-full {
    border-color: var(--gold-300);
}

.tl-pq-slot-open {
    border-style: dashed;
    opacity: 0.7;
}

.tl-pq-bar {
    height: 5px;
    background: var(--ink-100);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 6px;
}

.tl-pq-bar-fill {
    height: 100%;
    background: var(--moss-500);
    border-radius: 999px;
    transition: width 360ms var(--ease);
}

.tl-pq-slot-full .tl-pq-bar-fill {
    background: var(--gold-500);
}

.tl-pq-bar-empty {
    background: repeating-linear-gradient( 90deg, var(--ink-100) 0, var(--ink-100) 4px, transparent 4px, transparent 8px );
}

.tl-pq-slot-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
}

.tl-pq-id {
    font-family: var(--font-mono);
    color: var(--fg-1);
    font-size: 11.5px;
}

.tl-pq-rem {
    color: var(--fg-2);
    font-family: var(--font-mono);
}

.tl-pq-open {
    color: var(--fg-3);
    font-style: italic;
}
