/* ── Util page shared styles ────────────────────────────────────────────────
   Included by all util pages. Requires ../style.css (theme variables).
   Override --page-max-width in a page's own <style> block to adjust width.
   ────────────────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

.page-wrap {
    max-width: var(--page-max-width, 960px);
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

/* ── Top bar ── */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Shared pill styling for the back link + theme toggle */
.back-link, .theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--title-btn-radius);
    padding: 0.2rem 0.8rem;
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.back-link  { color: var(--accent); text-decoration: none; }
.theme-toggle { color: var(--text); }
.back-link:hover, .theme-toggle:hover { border-color: var(--accent); }
.back-link:hover { color: var(--text); }

/* ── Page heading ── */
h1.page-title { font-size: 1.7rem; margin: 0 0 0.2rem; color: var(--text); }
.page-subtitle { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 1.25rem; }

/* ── Status banner ── */
.status-banner {
    display: none;
    align-items: center;
    gap: 0.6rem;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}
.status-banner.err { background: #c0392b; }

/* ── Spinner ── */
.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
