/* Home page at /api/ (index.php) on the shared layout tokens (assets/layout/layout.css). */

.home-page { gap: 28px; }   /* width: the .tool-page cap (tool-ui.css), so wide screens get more cards per row */
.home-head { gap: 6px; }
.home-head h1 { font-size: 22px; }
.home-actions { margin-top: 8px; }
.home-guest-note { font-size: 12.5px; color: var(--faint) !important; }

.home-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.home-panel { gap: 10px; padding: 14px 16px 12px; }
.home-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; }
.home-panel-head h2, .home-section-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.home-empty { margin: 0; padding: 6px 0 4px; color: var(--faint); font-size: 12.5px; line-height: 1.55; }

.home-list { list-style: none; margin: 0 -8px; padding: 0; display: grid; }
.home-row {
    display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 8px; border-radius: 6px; color: var(--ink);
}
a.home-row:hover { background: var(--hover); text-decoration: none; }
.home-row .lay-i { color: var(--dim); }
.home-row-main { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
.home-row-main b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-row-main span { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-row-sub { font-family: var(--f-mono); font-size: 11.5px !important; }
.home-row-time { flex: none; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.home-row.is-static { color: var(--dim); }

.home-status { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; font-weight: 500; color: var(--dim); }
.home-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.home-status.is-bad { color: var(--bad); }
.home-status.is-bad .home-dot { background: var(--bad); }

.home-tools { display: grid; gap: 22px; }
.home-group { display: grid; gap: 8px; }
.home-group h3 { margin: 0; font-size: 11.5px; font-weight: 500; color: var(--faint); letter-spacing: .01em; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.home-tool {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px; min-width: 0;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink);
    transition: border-color .12s, background .12s;
}
.home-tool:hover { border-color: var(--line2); background: var(--sub); text-decoration: none; }
.home-tool-icon {
    flex: none; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center;
    border: 1px solid var(--line); background: var(--sub); color: var(--dim);
}
.home-tool:hover .home-tool-icon { color: var(--accent); }
.home-tool-text { display: grid; gap: 2px; min-width: 0; }
.home-tool-text b { font-weight: 500; }
.home-tool-text span { color: var(--dim); font-size: 12.5px; line-height: 1.45; }

.home-games { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.home-games-text { display: grid; gap: 2px; }
.home-games-text b { font-weight: 500; }
.home-games-text span { color: var(--dim); font-size: 12.5px; }
.home-games .ghb { margin: 0; }

@media (max-width: 860px) {
    .home-top { grid-template-columns: minmax(0, 1fr); }
    .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .home-games { grid-template-columns: minmax(0, 1fr); }
}
