/* SACRVM DESKTOP — shell-local layout only. Every value is a kit token; the
   desktop adds no colours of its own, so a theme swap carries it whole. */

.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}
.section h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.section .lead {
    color: var(--text-muted);
    max-width: 60ch;
    margin: 0 0 1.5rem;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.steps {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
    line-height: 1.9;
}

.note {
    margin: 1rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.facts { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.facts td {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.facts tr:last-child td { border-bottom: none; }
.facts td:first-child {
    color: var(--text-muted);
    padding-right: 1.5rem;
    white-space: nowrap;
}

/* The origin line under every tile — small, dim, and never absent. */
.tile-meta {
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-top: 0.35rem;
}

/* Per-tile menu: size and the way out. Hidden until the tile is hovered or
   something inside it has focus, so a wall of tiles stays calm — but it is
   always reachable by keyboard, and it stays open once opened. */
.tile-menu {
    position: absolute;
    top: 8px;
    right: 10px;
}
.tile-menu-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-dim);
    background: none;
    border: none;
    border-radius: var(--radius-m);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.15s var(--ease-smooth),
                color 0.15s var(--ease-smooth),
                background 0.15s var(--ease-smooth);
}
.tile:hover .tile-menu-btn,
.tile:focus-within .tile-menu-btn,
.tile-menu[open] .tile-menu-btn { opacity: 1; }
.tile-menu-btn:hover { color: var(--text); background: var(--hover); }
.tile-menu-btn:focus-visible {
    opacity: 1;
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Tile footprints, Windows-Phone style: the tile decides how much room it
   takes. Collapsed on narrow screens, where one column is the only sane
   answer. */
.grid .tile.size-wide  { grid-column: span 2; }
.grid .tile.size-large { grid-column: span 2; grid-row: span 2; }
@media (max-width: 768px) {
    .grid .tile.size-wide,
    .grid .tile.size-large { grid-column: auto; grid-row: auto; }
}

/* The tile that closes the grid — a slot, not an app. */
.tile-add {
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: transparent;
    border: 1px dashed var(--border-strong);
    color: var(--text-muted);
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}
.tile-add > sac-icon {
    --icon-size: 32px;
    margin-bottom: 0;
    color: var(--text-muted);
}
.tile-add:hover {
    border-color: var(--accent);
    color: var(--text);
}
.tile-add:hover > sac-icon { color: var(--accent); }

/* Dialog bodies: settings and info. */
.settings, .info { display: flex; flex-direction: column; gap: 0.5rem; }
.settings label {
    margin-top: 0.6rem;
    margin-bottom: 0;
}
.settings label:first-child { margin-top: 0; }
.settings .btn.danger { width: auto; align-self: flex-start; }
.info h3 {
    font-size: 0.95rem;
    margin-top: 0.8rem;
}
.info h3:first-child { margin-top: 0; }
.info p { margin: 0; }
.hint {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin: 0;
}

/* sac.dialog.confirm sets its message with textContent, so the line breaks
   in it are real characters — let them render. */
sac-dialog p { white-space: pre-line; }

.empty {
    color: var(--text-muted);
    margin: 1.5rem 0 0;
}
.empty[hidden] { display: none; }

/* A button that reads as a link, because it acts like one. */
.link-btn {
    padding: 0;
    border: none;
    background: none;
    color: var(--accent-text);
    font: inherit;
    cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

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