/* Guru Shishya: mobile-first styling on the brand tokens.
   static/brand/gs-brand.css (loaded first) defines --gs-* for light and dark. The short names below
   are this stylesheet's own and simply point at those tokens, so the brand is changed in one place. */

:root {
    --bg: var(--gs-bg);
    --surface: var(--gs-surface);
    --surface-2: var(--gs-surface-2);
    --fg: var(--gs-ink);
    --muted: var(--gs-ink-muted);
    --border: var(--gs-border);

    --accent: var(--gs-accent);              /* saffron: graphics and large text only */
    --accent-text: var(--gs-accent-text);    /* saffron for links and small text */
    --accent-soft: color-mix(in srgb, var(--gs-accent) 14%, var(--gs-surface));
    --button: var(--gs-ink);                 /* primary buttons are ink-coloured */
    --on-button: var(--gs-on-ink);
    --button-hover: var(--gs-accent-text);

    /* Semantic colours (success / error) keep their own hues. */
    --ok-bg: #e4f3e6;
    --ok-fg: #14532d;
    --ok-border: #b3d9ba;
    --err-bg: #fbe6e2;
    --err-fg: #8f1d12;
    --err-border: #efb7ae;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgb(30 27 58 / 8%), 0 4px 14px rgb(30 27 58 / 6%);
    --gutter: 1rem;
    --measure: 42rem;
    --focus: 0 0 0 3px color-mix(in srgb, var(--gs-accent-text) 30%, transparent);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ok-bg: #16311f;
        --ok-fg: #9be3b5;
        --ok-border: #2a5a3a;
        --err-bg: #3a1a1f;
        --err-fg: #ffb4ab;
        --err-border: #6b2a30;
        --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    }
}

@media (min-width: 40rem) {
    :root { --gutter: 1.5rem; }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    background: var(--bg);
    color: var(--fg);
}

a {
    color: var(--accent-text);
    text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-family: var(--gs-font-display); font-weight: 600; }

h1 {
    margin: 0.5rem 0 0.5rem;
    font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }

/* ---------- Header / nav ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    padding: 0.5rem max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter)));
    padding-top: max(0.5rem, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header .gs-logo { min-height: 44px; font-size: 22px; }

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 0.25rem;
    margin-inline: -0.5rem;
}

.site-nav a,
.site-nav .link-button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 0.6rem;
    font-size: 0.95rem;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.site-nav a:hover,
.site-nav .link-button:hover {
    color: var(--fg);
    background: var(--surface-2);
}

.inline-form { display: inline; margin: 0; }

.link-button {
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

/* On phones the brand gets its own row and the links wrap beneath it. */
@media (max-width: 39.99rem) {
    .site-header { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav { margin-inline: -0.6rem; }
    .site-nav a, .site-nav .link-button { white-space: nowrap; }
}

/* ---------- Layout ---------- */

main {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 1rem var(--gutter) 3rem;
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
}

.lede {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.messages {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.messages li {
    padding: 0.75rem 1rem;
    color: var(--ok-fg);
    background: var(--ok-bg);
    border: 1px solid var(--ok-border);
    border-radius: var(--radius-sm);
}

/* ---------- Lists (melodies, attempts) ---------- */

.melody-list,
.attempt-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.melody-list a,
.attempt-list a {
    position: relative;
    display: block;
    padding: 1rem 2.5rem 1rem 1.1rem;
    color: inherit;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.15s, transform 0.15s;
}

.melody-list a::after,
.attempt-list a::after {
    content: "›";
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-52%);
    font-size: 1.6rem;
    color: var(--muted);
}

.melody-list a:hover,
.attempt-list a:hover {
    border-color: var(--accent);
}

.melody-list a:active,
.attempt-list a:active { transform: scale(0.99); }

.melody-title {
    display: block;
    font-weight: 650;
    font-size: 1.05rem;
}

.melody-desc {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.92rem;
}

/* ---------- Cards / steps ---------- */

.step {
    margin: 1.25rem 0;
    padding: 1.1rem 1.1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.step > :last-child { margin-bottom: 0; }

.step h2 + audio,
.step audio + h2 { margin-top: 0.25rem; }

.step audio + h2 { margin-top: 1.25rem; }

audio {
    display: block;
    width: 100%;
    margin-bottom: 0.25rem;
}

#status {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* ---------- Buttons ---------- */

button:not(.link-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.5rem;
    font: inherit;
    font-weight: 650;
    color: var(--on-button);
    background: var(--button);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

button:not(.link-button):hover:not(:disabled) { background: var(--button-hover); }
button:not(.link-button):active:not(:disabled) { transform: scale(0.98); }

button:disabled {
    opacity: 0.55;
    cursor: default;
}

button.secondary {
    color: var(--accent-text);
    background: var(--accent-soft);
}

button.secondary:hover:not(:disabled) { background: var(--surface-2); }

a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.5rem;
    font-weight: 650;
    color: var(--on-button);
    background: var(--button);
    border-radius: 999px;
    text-decoration: none;
}

a.button:hover { background: var(--button-hover); }

.button-row { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }

button.small {
    min-height: 38px;
    padding: 0 1rem;
    font-size: 0.9rem;
}

#record-button { width: 100%; }

#retry-button {
    color: var(--accent-text);
    background: var(--accent-soft);
}

#retry-button:hover:not(:disabled) { background: var(--surface-2); }

@media (min-width: 30rem) {
    #record-button { width: auto; }
}

/* ---------- Score ---------- */

.score {
    margin: 0 0 1rem;
    font-size: clamp(2.6rem, 2rem + 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--accent);
    font-family: var(--gs-font-display);
    font-variant-numeric: tabular-nums;
}

.score-breakdown {
    display: grid;
    grid-template-columns: 1fr auto;
    margin: 0 0 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.score-breakdown dt,
.score-breakdown dd {
    margin: 0;
    padding: 0.7rem 1rem;
}

.score-breakdown dt { color: var(--muted); }
.score-breakdown dd { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.score-breakdown dt:not(:last-of-type),
.score-breakdown dd:not(:last-of-type) { border-bottom: 1px solid var(--border); }

/* ---------- Forms ---------- */

form p { margin: 0 0 1.1rem; }

form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    font: inherit;
    font-size: 1rem; /* 16px minimum stops iOS zooming on focus */
    color: var(--fg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

textarea { min-height: 6.5rem; resize: vertical; }

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-text);
    box-shadow: var(--focus);
}

input[type="file"] {
    width: 100%;
    padding: 0.6rem;
    font: inherit;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 0.9rem;
    font: inherit;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent-soft);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }

.helptext,
form span.helptext {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.85rem;
}

form ul:not(.errorlist) { margin: 0.3rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.85rem; }

form .errorlist {
    margin: 0 0 0.4rem;
    padding: 0;
    list-style: none;
    color: var(--err-fg);
    font-size: 0.9rem;
    font-weight: 600;
}

form > button[type="submit"],
.step form button[type="submit"] { margin-top: 0.25rem; }

@media (max-width: 29.99rem) {
    form > button[type="submit"],
    .step form button[type="submit"] { width: 100%; }
}

/* ---------- Folders ---------- */

.section-title { margin: 2rem 0 0.5rem; }

.muted { color: var(--muted); font-size: 0.95rem; }

.notice {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}

.badge {
    display: inline-block;
    padding: 0.05rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 999px;
}

.badge-ok { color: var(--ok-fg); background: var(--ok-bg); }

.track-list {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    counter-reset: track;
}

.track-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.4rem 1rem;
}

.track-list li + li { border-top: 1px solid var(--border); }

.track-list a { color: var(--fg); text-decoration: none; flex: 1; }
.track-list a:hover { color: var(--accent-text); }

.track-number {
    flex: none;
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-text);
    background: var(--accent-soft);
    border-radius: 50%;
}

form .order-input {
    flex: none;
    width: 4.2rem;
    min-height: 40px;
    padding: 0.3rem 0.5rem;
    text-align: center;
}

/* ---------- Folder practice ---------- */

.rules { margin: 0 0 1rem; padding-left: 1.2rem; }
.rules li { margin-bottom: 0.35rem; }

.run-progress { margin: 1rem 0 0; }
.run-progress span { display: block; margin-bottom: 0.35rem; font-weight: 650; font-size: 0.92rem; color: var(--muted); }

progress {
    display: block;
    width: 100%;
    height: 8px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-2);
}

progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

.phase {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    font-weight: 650;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.phase[data-phase="listen"] { color: var(--accent-text); background: var(--accent-soft); }
.phase[data-phase="record"] { color: var(--fg); }

.phase[data-phase="recording"]::before {
    content: "";
    flex: none;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: #e5484d;
    animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.55; }
}

#attempt-info { margin: -0.25rem 0 0.9rem; }

#result[data-outcome="passed"] { border-color: var(--ok-border); }
#result-message { font-weight: 600; margin-bottom: 0.5rem; }

.stop-form { margin-top: 1.5rem; }

.picker { padding: 0; }
.picker summary {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 1.1rem;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}
.picker summary::-webkit-details-marker { display: none; }
.picker summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.picker[open] summary::after { content: "▴"; }
.picker .track-list { margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: none; }
.picker .track-list li { padding: 0; }

button.picker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 52px;
    padding: 0.4rem 1rem;
    font-weight: 500;
    text-align: left;
    color: var(--fg);
    background: none;
    border-radius: 0;
    justify-content: flex-start;
}
button.picker-item:hover:not(:disabled) { background: var(--surface-2); }
.picker-item[aria-current="true"] { background: var(--accent-soft); }
.picker-title { flex: 1; }
.picker-note { font-size: 0.82rem; color: var(--muted); }

.results {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.results li {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1rem;
    padding: 0.8rem 1rem;
}

.results li + li { border-top: 1px solid var(--border); }
.results-title { font-weight: 650; }
.results-score {
    grid-row: span 2;
    align-self: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-text);
    font-variant-numeric: tabular-nums;
}
.results-meta { color: var(--muted); font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
    .phase[data-phase="recording"]::before { animation: none; }
}

/* ---------- Errors ---------- */

.error {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    color: var(--err-fg);
    background: var(--err-bg);
    border: 1px solid var(--err-border);
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ---------- Plans and pricing ---------- */

.nav-upgrade { color: var(--accent-text) !important; font-weight: 650; }

.plans { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 52rem) {
    .plans { grid-template-columns: repeat(3, 1fr); }
    main:has(.plans) { max-width: 60rem; }
}

.plan {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.plan h2 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; font-size: 1.3rem; }
.plan-featured { border-color: var(--accent); }
.plan-current { outline: 2px solid var(--accent); outline-offset: -2px; }

.price { margin: 0; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-alt { margin: 0.25rem 0 1rem; color: var(--muted); font-size: 0.92rem; }

.plan-features { margin: 0 0 1.25rem; padding-left: 1.2rem; flex: 1; }
.plan-features li { margin-bottom: 0.4rem; }
.plan-actions { display: grid; gap: 0.6rem; }
.plan-actions form { margin: 0; }
.plan-actions button, .plan-actions a.button { width: 100%; }
.plan-actions p { margin: 0; }

.upgrade-card {
    padding: 1rem;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}
.upgrade-card p { margin-bottom: 0.75rem; }

.locked-title { color: var(--muted); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1rem 0; }
.stat {
    display: flex; flex-direction: column; align-items: center; padding: 0.9rem 0.5rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.8rem; color: var(--muted); text-align: center; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.data-table th, .data-table td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { font-size: 0.8rem; color: var(--muted); font-weight: 650; white-space: nowrap; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Cheat text ("Show the notes") ---------- */

.cheat { margin-top: 0.9rem; }
.cheat summary { cursor: pointer; font-weight: 650; color: var(--accent-text); min-height: 44px; display: flex; align-items: center; }
.cheat-text {
    margin: 0.25rem 0 0;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    line-height: 1.8;
}

/* ---------- Badges ---------- */

.badge-art { width: 96px; height: 96px; flex: none; }
.badge-ring { fill: var(--accent); }
.badge-face { fill: var(--surface); }
.badge-label { font-size: 30px; font-weight: 800; fill: var(--fg); font-family: inherit; }
.badge-dots circle { fill: var(--accent-text); }
.badge-dots .badge-dot-last { fill: var(--accent); }
.badge-locked { opacity: 0.35; filter: grayscale(1); }

.badge-shelf { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem; }
.badge-shelf li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.25rem; padding: 1rem 0.5rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.badge-name { font-weight: 650; font-size: 0.95rem; }

.badge-earned { display: flex; align-items: center; gap: 1rem; border-color: var(--accent); }
.badge-earned h2 { margin-bottom: 0.25rem; }
.badge-earned p { margin: 0; }

/* ---------- Avatars ---------- */

.avatar {
    --avatar-size: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}
.avatar-default {
    font-weight: 700;
    font-size: calc(var(--avatar-size) * 0.45);
    line-height: 1;
    color: var(--accent-text);
    background: var(--accent-soft);
}
.nav-profile { gap: 0.4rem; }
.profile-head { display: flex; align-items: center; gap: 1rem; margin: 0.5rem 0 1rem; }
.profile-head p { margin: 0; }
.profile-name { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }
.avatar-form p { margin-bottom: 0.6rem; }
.avatar-form + .inline-form { display: block; margin-top: 0.75rem; }

/* ---------- Account pages (django-allauth) and social sign-in ---------- */

.provider-list { list-style: none; margin: 0.5rem 0 1rem; padding: 0; display: grid; gap: 0.6rem; }
.provider-button { width: 100%; }
.panel-actions { list-style: none; margin: 1rem 0 0; padding: 0; }
.button-stack { display: grid; gap: 0.6rem; margin: 0.75rem 0; }
a.button-secondary { color: var(--accent-text); background: var(--accent-soft); }
a.button-secondary:hover { background: var(--surface-2); }
button.danger { background: #b42318; color: #fff; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
main > h2 { margin-top: 1.5rem; }

/* ---------- Microphone check ---------- */

.mic-dialog {
    width: min(28rem, calc(100vw - 2rem));
    padding: 1.25rem;
    color: var(--fg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgb(0 0 0 / 35%);
}
.mic-dialog::backdrop { background: rgb(10 10 20 / 55%); }
.mic-dialog h2 { margin-top: 0; }
.mic-dialog [hidden] { display: none !important; }

.level { height: 14px; margin: 0.5rem 0 1rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.level span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.06s linear; }

.mic-result { padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.mic-result[data-verdict="good"] { background: var(--ok-bg); color: var(--ok-fg); }
.mic-result[data-verdict="quiet"], .mic-result[data-verdict="loud"], .mic-result[data-verdict="noisy"] { background: var(--err-bg); color: var(--err-fg); }
.mic-headline { font-weight: 700; margin: 0 0 0.25rem; }
.mic-result ul { margin: 0; padding-left: 1.2rem; }

/* ---------- Login / sign-up lockup ---------- */

.entrance-logo { display: flex; justify-content: center; margin: 1rem 0 1.5rem; }
.entrance-logo .gs-logo--stacked { font-size: clamp(40px, 10vw, 64px); }
.entrance-logo .gs-logo--stacked .gs-logo__mark { height: 56px; }

/* ---------- Visitors ---------- */

.site-nav a.nav-signup {
    color: var(--on-button);
    background: var(--button);
    padding: 0 0.9rem;
    border-radius: 999px;
    font-weight: 650;
}
.site-nav a.nav-signup:hover { background: var(--button-hover); color: var(--on-button); }

/* ---------- Tags ---------- */

.tag-filters { display: grid; gap: 0.6rem; margin: 0 0 1.25rem; }
.tag-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.tag-group-label { min-width: 4.5rem; font-size: 0.8rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tag-chip {
    display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.85rem;
    font-size: 0.9rem; text-decoration: none; color: var(--fg);
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.tag-chip:hover { border-color: var(--accent-text); }
.tag-chip-on { color: var(--on-button); background: var(--button); border-color: var(--button); }
.tag-clear { font-size: 0.9rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.tag-label { display: inline-block; padding: 0.05rem 0.6rem; font-size: 0.78rem; font-weight: 600; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag-label.tag-raga { color: var(--accent-text); background: var(--accent-soft); }
h1 + .tag-row { margin: 0 0 0.75rem; }

.sa-form select { max-width: 22rem; }
