:root {
    --bg: #fff;
    --paper: #f2f7fd;
    --ink: #26303f;
    --muted: #5b6672;
    --line: #c2d3e5;
    --accent: #445570;
    --accent-dark: #36445c;
    --soft: #eaf2fb;
    --amber: #c8862b;
    --card-radius: 12px;
    --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    --app-color-primary: #445570;
    --app-color-secondary: #616455;
    --app-color-tertiary: #40696A;
    --app-color-quaternary: darkred;
    --torn-background-color: gray;
}

@font-face {
    font-family: 'Saira Stencil One';
    src: url('/assets/fonts/Saira_Stencil_One/SairaStencilOne-Regular.woff2') format('woff2'),
    url('/assets/fonts/Saira_Stencil_One/SairaStencilOne-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    /* Match the rest of the app (Bootstrap's default sans-serif body stack). */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
}

a {
    color: var(--accent-dark);
}

.row {
    --gutter-x: 1.5rem;
    --gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--gutter-y));
    margin-right: calc(-0.5 * var(--gutter-x));
    margin-left: calc(-0.5 * var(--gutter-x));
}

.row > * {
    box-sizing: border-box;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--gutter-x) * 0.5);
    padding-left: calc(var(--gutter-x) * 0.5);
    margin-top: var(--gutter-y);
}

.col {
    flex: 1 0 0%;
}

.col-auto {
    flex: 0 0 auto;
    width: auto;
}

.container-fluid {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
}

.post-card-hidden {
    display: none;
}

.load-more-wrap {
    text-align: center;
    margin-top: 1.25rem;
}

.load-more-btn {
    border: 0;
    border-radius: 0.25rem;
    background: var(--accent);
    color: #fff;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 1rem;
}

.load-more-btn:hover {
    background: var(--accent-dark);
}

.justify-content-center {
    justify-content: center !important;
}


.post-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.25rem 0 0.75rem;
}

.post-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    text-decoration: none;
}

.post-chip-genre {
    color: var(--accent-dark);
}

.post-chip-mood {
    color: var(--accent);
}

.post-chip-theme {
    color: var(--muted);
}

.search-match {
    border-left: 3px solid var(--accent);
    margin: 0.75rem 0;
    padding-left: 0.65rem;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    color: var(--muted);
}

.search-match mark {
    background: var(--soft);
    color: var(--ink);
    padding: 0 0.1rem;
}

.video-appearances {
    margin-top: 1rem;
}

.video-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
}

.video-thumb {
    width: 150px;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    text-decoration: none;
}

.video-thumb img {
    width: 150px;
    height: 84px;
    object-fit: cover;
    display: block;
    border: 1px solid var(--line);
    background: #fff;
    margin-bottom: 0.35rem;
}

.album-appearances {
    margin-top: 1rem;
}

.album-songs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: left;
    margin-top: 1rem;
}

.album-song-wrap {
    text-align: center;
}

.album-image-wrap {
    position: relative;
    display: inline-block;
}

.album-image-wrap img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.album-vinyl-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

.control-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    margin: 0.5rem auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn.active {
    background: var(--accent-dark);
}

a.btn.btn-quaternary {
    background-color: var(--accent);
    padding: 0.5rem;
    color: white;
    margin: 0.5rem;
    border-radius: 0.25rem;
    text-decoration: none;
}

.site-header {
    padding: 0.75rem clamp(0.75rem, 3vw, 2rem);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.site-header-row {
    align-items: center;
}

.logo {
    height: 5rem;
    width: auto;
    margin-top: 0px;
}

.menu-col {
    min-width: 320px;
}

.mobile-post-title {
    display: block;
    margin-top: 0;
    text-align: left;
}

.desktop-post-title {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--app-color-secondary) !important;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    font-family: 'Saira Stencil One', cursive;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.brand .title {
    margin-top: -18px;
    transform: rotate(-3deg) !important;
    display: inline-block;
    margin-left: 1rem;
    line-height: 1;
}

.brand .title,
.brand img {
    pointer-events: none;
    user-select: none;
}

.brand img {
    margin-top: 20px;
}

.header-menu {
    row-gap: 0.35rem;
}

.header-menu-item,
.header-menu-item.selected i,
.header-menu-item.selected .text {
    text-align: center;
    color: darkred;
}

.menu-button,
.nav-link {
    user-select: none !important;
    cursor: pointer !important;
    text-align: center;
    margin: 0;
    padding: 3px 0 0 0;
    line-height: normal;
    font-size: 1.1rem;
    color: var(--app-color-secondary);
    background: transparent;
    border-color: transparent;
    text-decoration: none;
}

.menu-button i,
.nav-link i {
    color: var(--app-color-primary);
    margin: auto;
    font-size: 2rem;
    vertical-align: top;
}

/* Custom duotone nav icons (SuperScout style): single steel-blue fill, backdrop
   shapes faded, focal shapes full. */
.nav-ico {
    display: inline-block;
    line-height: 0;
}

.nav-ico svg {
    width: 34px;
    height: 34px;
    display: block;
    margin: 0 auto;
    fill: #3f6f8f;
}

.nav-ico .duo-base {
    opacity: 0.4;
}

.nav-ico .duo-accent {
    opacity: 1;
}

.nav-ico .duo-stroke {
    fill: none;
    stroke: #3f6f8f;
    stroke-width: 2;
    stroke-linecap: round;
}

.menu-button.text,
.nav-link.text {
    display: block;
    color: var(--torn-background-color);
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    caret-color: transparent;
    font-size: 0.7rem;
    line-height: 0.7rem;
    text-align: center;
    padding: 0;
    margin: 3px auto;
}

.menu-button:hover,
.nav-link:hover {
    color: var(--app-color-secondary) !important;
    text-decoration: underline;
}

.menu-button:hover i,
.nav-link:hover i {
    color: var(--app-color-secondary) !important;
}

.sidebar nav a,
.card-links a {
    border-radius: 0.25rem;
    background: var(--accent);
    color: #fff;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.sidebar nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: clamp(1.5rem, 4vw, 3rem);
    width: min(1160px, calc(100% - 2rem));
    margin: 2rem auto;
}

main,
.sidebar {
    min-width: 0;
}

.page-intro,
.post-card,
.sidebar section,
.search-form {
    background-sized: cover;
}

.sidebar section, .post-card {
    border: 1px solid var(--line);
    background-color: var(--paper);
    background-image: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.post-card {
    border-top: 4px solid var(--app-color-primary);
}

/* Right-hand sidebar facet panels: light gray (song cards stay light blue). */
.sidebar section {
    background-color: #f1f2f4;
    border-color: #d4d8de;
}

.sidebar section {
    ul, .tag-list {
        max-height: 150px;
        overflow-y: auto;
    }
}

.sidebar section,
.search-form {
    padding: 0 1.25rem;
}

.page-intro {
    padding: 1.25rem 0;
}

h1 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.15;
    margin: 0;
    color: var(--app-color-primary);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 800;
}

.page-intro h1::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin: 0.5rem 0 0;
    border-radius: 3px;
    background: var(--amber);
}

h2 {
    color: var(--app-color-primary);
}

p {
    margin: 0;
}


h2 {
    font-size: 1.25rem;
}

.post-list {
    display: grid;
    gap: 1rem;
}

.post-card {
    padding: 1rem;
}

.card-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--line);
    background: #fff;
}

.post-date,
.site-footer {
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

.post-bmi {
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
    /* Pull up against the title (cancels the h2's default bottom margin)
       and leave the breathing room below instead. */
    margin: -0.6rem 0 0.85rem;
    text-align: left;
}

.card-links,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-links {
    justify-content: center;
}

.card-links a {
    background: var(--soft);
    color: var(--accent-dark);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    background: #fff;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
}

.tag span,
.link-list span {
    color: var(--muted);
}

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

.sidebar {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.search-form label,
.sidebar h2 {
    display: block;
    margin-bottom: 0.6rem;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
}

.search-form div {
    display: flex;
    gap: 0.35rem;
}

.search-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    padding: 0.45rem 0.55rem;
}

.search-form button {
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 0.45rem 0.75rem;
}

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

.link-list a {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.25rem 0;
    text-decoration: none;
}

.empty {
    border: 1px dashed var(--line);
    background: var(--paper);
    padding: 1rem;
}

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

@media (max-width: 800px) {
    .site-header,
    .layout {
        display: block;
    }

    .site-header-row {
        justify-content: center;
    }

    .brand-col,
    .menu-col {
        width: 100%;
        text-align: center;
    }

    .menu-col {
        min-width: 0;
    }

    .brand {
        font-size: 8vw;
        white-space: normal;
    }

    .logo {
        height: 4rem;
        margin-top: 0.5rem;
    }

    .post-card {
        display: block;
    }

    .post-card > .row {
        display: grid;
        grid-template-columns: 9rem minmax(0, 1fr);
        align-items: start;
    }

    .post-card > .row > .col-auto,
    .post-card > .row > .col {
        width: auto;
        min-width: 0;
    }

    .card-thumb {
        display: block;
        max-width: 9rem;
    }

    .site-header nav,
    .sidebar,
    .card-thumb {
        margin-top: 1rem;
    }
}

@media (max-width: 520px) {
    .post-card > .row {
        display: block;
    }

    .post-card > .row > .col-auto,
    .post-card > .row > .col {
        width: 100%;
    }

    .mobile-post-title {
        display: block;
        margin-top: 0;
        text-align: center;
    }

    .post-bmi {
        text-align: center;
    }

    .desktop-post-title {
        display: none;
    }

    .card-thumb {
        max-width: 12rem;
        margin: 0 auto 0.75rem;
    }

    .post-card .col-auto {
        text-align: center;
    }

    .brand .title {
        margin-left: 0.5rem;
    }

    .logo {
        height: 3.2rem;
    }

    .menu-button i,
    .nav-link i {
        font-size: 1.6rem;
    }
}
