:root {
    --bg: #14110f;
    --panel: #201a17;
    --panel-strong: #2a201c;
    --line: #4d3a31;
    --text: #f8f1ea;
    --muted: #d3c0b3;
    --accent: #d29a5b;
    --accent-strong: #f0be73;
    --success: #8fd3a9;
    --error: #ffb3a8;
    --shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(210, 154, 91, 0.18), transparent 40%),
        linear-gradient(180deg, #120f0d 0%, var(--bg) 100%);
    color: var(--text);
    font: 400 1rem/1.7 "Segoe UI", Arial, sans-serif;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #000;
    border-radius: 0.5rem;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(20, 17, 15, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-grid,
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.site-title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.site-title a {
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-nav a,
.inline-link {
    color: var(--accent-strong);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.hero,
.section {
    padding: 3.5rem 0;
}

.hero-grid,
.track-layout,
.comments-layout,
.card-grid {
    display: grid;
    gap: 1.5rem;
}

.hero-grid > *,
.track-layout > *,
.comments-layout > *,
.card-grid > *,
.track-card,
.comment-card,
.hero-copy,
.hero-panel,
.track-detail,
.track-sidebar > *,
.info-card,
.comment-form-card,
.not-found {
    min-width: 0;
}

.hero-grid,
.track-layout {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
}

.card-grid,
.comments-layout {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hero-copy,
.hero-panel,
.track-detail,
.track-sidebar > *,
.info-card,
.comment-form-card,
.comment-card,
.track-card,
.not-found {
    background: linear-gradient(180deg, rgba(42, 32, 28, 0.98), rgba(27, 22, 19, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.track-detail,
.track-sidebar > *,
.info-card,
.comment-form-card,
.not-found {
    padding: 1.5rem;
}

.eyebrow,
.track-number {
    margin: 0 0 0.75rem;
    color: var(--accent-strong);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero h2,
.section-heading h2,
.track-detail h1,
.track-detail h2,
.comment-form-card h3,
.info-card h2,
.info-card h3,
.not-found h1 {
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.lead,
.section-heading p,
.info-card p,
.track-detail p,
.comment-form-card p {
    color: var(--muted);
}

.hero-actions,
.track-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.button,
button,
input,
textarea {
    font: inherit;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.875rem;
    max-width: 100%;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.button:hover,
.button:focus-visible,
.site-nav a:hover,
.site-nav a:focus-visible,
.inline-link:hover,
.inline-link:focus-visible {
    transform: translateY(-1px);
}

.button:focus-visible,
.site-nav a:focus-visible,
.inline-link:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 3px;
}

.button-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #21160f;
    font-weight: 700;
}

.button-secondary {
    background: transparent;
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
}

.stat-list {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.stat-list div {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.stat-list dt {
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-list dd {
    margin: 0.35rem 0 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.section-heading {
    margin-bottom: 1.5rem;
}

.track-list,
.comment-list {
    display: grid;
    gap: 1rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.track-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.track-card {
    padding: 1.25rem;
}

.track-header {
    display: grid;
    gap: 0.25rem;
}

.track-heading h3 {
    margin: 0 0 1rem;
    line-height: 1.35;
}

.track-heading a {
    text-decoration: none;
}

audio {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
}

.track-sidebar {
    display: grid;
    gap: 1.5rem;
}

.lyrics-card,
.lyrics-body,
.lyrics-meta {
    display: grid;
    gap: 1rem;
}

.lyrics-meta {
    margin: 0;
}

.lyrics-meta div {
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lyrics-meta div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.lyrics-meta dt {
    color: var(--muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.lyrics-meta dd {
    margin: 0.3rem 0 0;
    color: var(--text);
    font-weight: 600;
}

.lyrics-stanza,
.lyrics-notice {
    margin: 0;
    color: var(--muted);
    white-space: pre-line;
}

.share-status,
.flash,
.empty-state {
    margin-top: 0.9rem;
}

.flash {
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
}

.flash-success {
    background: rgba(143, 211, 169, 0.12);
    color: var(--success);
}

.flash-error {
    background: rgba(255, 179, 168, 0.12);
    color: var(--error);
}

.comment-form-card form,
.field {
    display: grid;
    gap: 0.45rem;
}

.comment-form-card form {
    gap: 1rem;
}

input,
textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

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

.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.comment-card {
    padding: 1rem 1.1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
    color: var(--muted);
}

.comment-body {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.not-found {
    margin: 4rem auto;
    padding: 2rem;
}

@media (max-width: 720px) {
    .header-grid,
    .footer-grid,
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero,
    .section {
        padding: 2.5rem 0;
    }
}
