/* Experiment 8 - Retailer Tomatoes (server-rendered, no JS) */

.tm-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

.tm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tm-title {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tm-logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tm-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tm-actions {
    display: flex;
    gap: 0.5rem;
}

.tm-btn {
    display: inline-block;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.tm-btn:hover {
    filter: brightness(1.1);
}

.tm-btn-ghost {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.tm-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.tm-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.tm-card h2 + h2,
.tm-card table + h2,
.tm-card p + h2 {
    margin-top: 1.5rem;
}

.tm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 760px) {
    .tm-grid {
        grid-template-columns: 1fr;
    }
}

.tm-statbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.5rem;
    margin-bottom: 1.25rem;
}

.tm-stat {
    display: flex;
    flex-direction: column;
}

.tm-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.tm-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tm-pos {
    color: var(--accent-green);
}

.tm-neg {
    color: #f87171;
}

.tm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.tm-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.75rem 0.4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tm-table td {
    padding: 0.45rem 0.75rem 0.45rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.tm-table tr:last-child td {
    border-bottom: none;
}

.tm-table-total td {
    font-weight: 700;
    color: var(--text-primary);
}

.tm-scroll {
    overflow-x: auto;
}

.tm-history {
    min-width: 900px;
    white-space: nowrap;
}

.tm-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.75rem 0 0;
}

.tm-error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.92rem;
}

.tm-rules {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.tm-rules li {
    margin-bottom: 0.5rem;
}

.tm-field {
    margin-bottom: 1rem;
    max-width: 480px;
}

.tm-field label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tm-field input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.tm-field input:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 1px;
}

.tm-decision {
    border-color: rgba(245, 158, 11, 0.35);
}

.tm-start {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tm-final-score {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 1rem;
}

.tm-ranking-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tm-ranking-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.25rem;
    border-bottom: 1px solid var(--border-color);
}

.tm-ranking-row:last-child {
    border-bottom: none;
}

.tm-ranking-first .tm-ranking-name,
.tm-ranking-first .tm-ranking-score {
    color: var(--accent-orange);
}

.tm-ranking-pos {
    width: 2rem;
    font-weight: 700;
    color: var(--text-muted);
}

.tm-ranking-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 600;
}

.tm-ranking-score {
    font-weight: 700;
    color: var(--accent-green);
}

.tm-empty {
    color: var(--text-muted);
}
