/* Terminal-window cards, shared by the projects and tools pages */
.term-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    margin: 2rem 0;
}

.term-card {
    --brand: orange;
    --term-bg: #0d0d0d;
    --term-bar: #1a1a1a;
    --term-border: #333;
    --term-frame: #6b6b6b;
    --term-text: #c9d1d9;
    --term-dim: #6b7280;
    --term-prompt: orange;
    --term-dir: #7f9cb8;
    --term-status: #ffcc00;
    display: flex;
    flex-direction: column;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--term-text);
    background: var(--term-bg);
    border: 1px solid var(--term-frame);
    border-top: 2px solid color-mix(in srgb, var(--brand) 70%, var(--term-frame));
    box-shadow: inset 0 0 0 1px #2b2b2b, 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.term-card:hover,
.term-card:focus-within {
    border-color: color-mix(in srgb, var(--term-prompt) 55%, var(--term-frame));
    box-shadow: inset 0 0 0 1px #2b2b2b, 0 0 0 1px color-mix(in srgb, var(--term-prompt) 25%, transparent), 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* The window tab itself is in beos.css; the status sits beside it. */
.term-status {
    flex-shrink: 0;
    padding-bottom: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--term-status);
}

/* Session output */
.term-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.1rem 0.75rem;
    color: inherit;
    text-decoration: none;
}

.term-body--image {
    background:
        linear-gradient(rgba(13, 13, 13, 0.82), rgba(13, 13, 13, 0.94)),
        var(--banner) center / cover no-repeat;
}

.term-cmd {
    color: var(--term-dim);
}

.term-prompt {
    color: var(--term-prompt);
    font-weight: 700;
}

.term-who {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.15rem 0 0.6rem;
}

.term-who h3 {
    margin: 0;
    font-family: inherit;
    font-size: 1.15rem;
    line-height: 1.3;
    color: #fff;
}

.term-out {
    margin: 0 0 0.6rem;
    line-height: 1.55;
    text-align: left;
    color: var(--term-text);
}

/* Commands as actions */
.term-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1rem;
    padding: 0.75rem 1.1rem 1rem;
    border-top: 1px dashed var(--term-border);
}

.term-actions a {
    color: var(--term-prompt);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

.term-actions a:hover,
.term-actions a:focus-visible {
    color: #000;
    background: var(--term-prompt);
    outline: none;
}

.term-actions a:last-of-type::after {
    content: "";
    display: inline-block;
    width: 0.55em;
    height: 1.1em;
    margin-left: 0.6em;
    vertical-align: text-bottom;
    background: var(--term-prompt);
    animation: term-blink 1.1s steps(1) infinite;
}

@keyframes term-blink {
    50% {
        opacity: 0;
    }
}

@media (max-width: 684px) {
    .term-cards {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .term-card {
        transition: none;
    }

    .term-actions a:last-of-type::after {
        animation: none;
    }
}
