/* Premium Studio component layer (§5.5). Dark, precise, one accent (brass). */

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

body {
    margin: 0;
    background: var(--ink-950);
    color: var(--text-100);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brass-300); text-decoration: none; }
a:hover { color: var(--brass-400); }

h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -0.01em; font-weight: 600; }
h1 { font-size: 40px; margin: 0 0 8px; }
h2 { font-size: 22px; margin: 0 0 12px; }
.muted { color: var(--text-400); }
.mono { font-family: var(--font-mono); }

/* ---- App shell ---- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--ink-900);
    border-right: 1px solid var(--ink-700);
    padding: 24px 16px;
    display: flex; flex-direction: column; gap: 4px;
}
.brand { display: inline-flex; align-items: center; padding: 4px 8px 20px; line-height: 0; }
.brand .accent { color: var(--brass-400); }
.brand__logo { height: 30px; width: auto; display: block; }
.brand__logo--sm { height: 24px; }
.nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius);
    color: var(--text-400); font-weight: 500;
    transition: background .15s ease-out, color .15s ease-out;
}
.nav a:hover { background: var(--ink-800); color: var(--text-100); }
.nav a.active { background: var(--ink-800); color: var(--text-100); box-shadow: inset 2px 0 0 var(--brass-400); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 32px; border-bottom: 1px solid var(--ink-700);
}
.content { padding: 32px; flex: 1; }

/* Hamburger toggle + drawer backdrop — hidden on desktop, shown via the mobile media query. */
.nav-toggle {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-right: 4px;
    background: transparent; border: 1px solid var(--ink-700); border-radius: var(--radius);
    color: var(--text-100); cursor: pointer; flex: none;
    transition: background .15s ease-out;
}
.nav-toggle:hover { background: var(--ink-800); }
.nav-backdrop { display: none; }

/* ---- Cards / tiles ---- */
.card {
    background: var(--ink-900);
    border: 1px solid var(--ink-700);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 24px;
}
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-tile .stat-num { font-family: var(--font-display); font-size: 40px; font-weight: 700; }
.stat-tile .stat-label { color: var(--text-400); font-size: 14px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius);
    font-family: var(--font-ui); font-weight: 600; font-size: 15px;
    border: 1px solid transparent; cursor: pointer;
    transition: transform .15s ease-out, background .15s ease-out, border-color .15s ease-out;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brass-400); color: var(--ink-950); }
.btn-primary:hover { background: var(--brass-300); }
.btn-ghost { background: transparent; color: var(--text-100); border-color: var(--ink-700); }
.btn-ghost:hover { border-color: var(--text-400); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .7; cursor: default; pointer-events: none; }
.spinner {
    display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
    border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
    animation: spin .6s linear infinite; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Busy state applied by site.js while a form/htmx/download request is in flight. */
.is-loading { pointer-events: none; opacity: .75; cursor: default; }

/* ---- Premium audio player ---- */
.audio-player {
    height: 38px; width: 100%; max-width: 300px;
    border-radius: 999px;
    background: var(--ink-800);
    border: 1px solid var(--ink-700);
    vertical-align: middle;
    color-scheme: dark; /* renders the native controls in dark mode (Chrome/Edge) */
    transition: border-color .15s ease-out;
}
.audio-player:hover { border-color: var(--brass-400); }
.audio-player--sm { height: 34px; max-width: 220px; }
.audio-player::-webkit-media-controls-enclosure {
    background: var(--ink-800);
    border-radius: 999px;
}
.audio-player::-webkit-media-controls-panel { background: var(--ink-800); }
.audio-player::-webkit-media-controls-current-time-display,
.audio-player::-webkit-media-controls-time-remaining-display { color: var(--text-100); }

/* ---- Project track rows ---- */
.track-row:hover { background: var(--ink-800); }
.track-row__title { font-weight: 600; color: var(--text-100); }
.track-row__title:hover { color: var(--brass-400); }

/* ---- Track version rows (audio) ---- */
.version-row { padding:12px 0; border-bottom:1px solid var(--ink-700); }
.version-row:last-child { border-bottom:none; }
.version-row__head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.version-row__remove { flex:0 0 auto; padding:4px 8px; }

/* ---- Confirmation modal ---- */
.modal {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .62); backdrop-filter: blur(2px);
}
.modal.is-open { display: flex; }
.modal__dialog {
    background: var(--ink-900); border: 1px solid var(--ink-700);
    border-radius: var(--radius); box-shadow: var(--shadow-card);
    padding: 24px; width: 100%; max-width: 400px; margin: 16px;
}
.modal__message { margin: 0 0 20px; color: var(--text-100); font-size: 15px; line-height: 1.5; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---- Topbar right cluster: notification, role pill, avatar, sign out ---- */
.topbar__actions { display: flex; align-items: center; gap: 12px; flex: none; }
.topbar__actions > * { flex: none; }
.topbar__actions .pill { white-space: nowrap; }
.topbar__actions .avatar--sm { width: 36px; height: 36px; }
.topbar__actions .btn-sm { height: 36px; }

/* ---- Notification bell (topbar) ---- */
.notif { position: relative; display: flex; }
.notif > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    color: var(--text-100); border: 1px solid var(--ink-700);
    transition: border-color .15s ease-out, color .15s ease-out;
}
.notif > summary::-webkit-details-marker { display: none; }
.notif > summary:hover { border-color: var(--text-400); color: var(--brass-400); }
.notif[open] > summary { border-color: var(--brass-400); color: var(--brass-400); }
.notif__badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--brass-400); color: var(--ink-950);
    border-radius: 999px; font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.notif__panel {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 50;
    width: 300px; background: var(--ink-900);
    border: 1px solid var(--ink-700); border-radius: var(--radius);
    box-shadow: var(--shadow-card); overflow: hidden;
}
.notif__header {
    padding: 12px 16px; border-bottom: 1px solid var(--ink-700);
    font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: var(--text-100);
}
.notif__empty { padding: 24px 16px; text-align: center; color: var(--text-400); font-size: 14px; }
.notif__item { display: block; padding: 12px 16px; border-bottom: 1px solid var(--ink-800); color: var(--text-100); font-size: 14px; }
.notif__item:last-child { border-bottom: none; }
.notif__item:hover { background: var(--ink-800); }

.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.admin-role-select { padding: 6px 10px; font-size: 13px; max-width: 200px; }
.nav-admin { margin-top: auto; }
.invite-success { border-top: 1px solid var(--ink-700); padding-top: 14px; }
.htmx-request.btn { opacity: .6; pointer-events: none; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; color: var(--text-400); }
.input {
    width: 100%; padding: 11px 14px;
    background: var(--ink-800); color: var(--text-100);
    border: 1px solid var(--ink-700); border-radius: var(--radius);
    font-family: var(--font-ui); font-size: 15px;
}
.input:focus { outline: 2px solid var(--brass-400); outline-offset: 2px; border-color: transparent; }
.field-error, .validation-summary-errors, .text-danger { color: var(--signal-red); font-size: 13px; }
.info-banner {
    color: var(--signal-green); font-size: 13px;
    border: 1px solid color-mix(in srgb, var(--signal-green) 35%, transparent);
    border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
}
.info-banner--error {
    color: var(--signal-red);
    border-color: color-mix(in srgb, var(--signal-red) 35%, transparent);
}

/* ===== Blog (public) — premium ===== */
.blog-wrap { max-width:1120px; margin:0 auto; padding:0 24px 72px; }

/* Hero */
.blog-hero { max-width:1120px; margin:0 auto; padding:64px 24px 28px; }
.blog-hero__eyebrow { font-family:var(--font-mono, monospace); font-size:12px; letter-spacing:3px; text-transform:uppercase; color:var(--brass-300); }
.blog-hero__title { font-size:60px; line-height:1.02; margin:14px 0 12px; }
.blog-hero__sub { font-size:18px; color:var(--text-400); max-width:560px; margin:0; }

.blog-tag { display:inline-block; font-family:var(--font-mono, monospace); font-size:11px; letter-spacing:2px; text-transform:uppercase;
    color:var(--brass-300); border:1px solid color-mix(in srgb, var(--brass-400) 40%, transparent); border-radius:var(--radius-pill); padding:3px 10px; }
.blog-meta { font-family:var(--font-mono, monospace); font-size:12.5px; color:var(--text-400); letter-spacing:.3px; }

/* Shared media framing — subtle zoom on hover, brass glow */
.blog-feature__media, .blog-card__media { overflow:hidden; background:var(--ink-800); position:relative; }
.blog-feature__media img, .blog-card__media img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .5s cubic-bezier(.2,.7,.2,1); }
.blog-feature:hover .blog-feature__media img, .blog-card:hover .blog-card__media img { transform:scale(1.04); }
.blog-feature__placeholder, .blog-card__placeholder { position:absolute; inset:0;
    background:radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--brass-400) 18%, transparent), transparent 60%), var(--ink-800); }

/* Featured (page 1, first post) */
.blog-feature { display:grid; grid-template-columns:1.15fr .85fr; gap:0; text-decoration:none; color:inherit;
    border:1px solid var(--ink-700); border-radius:calc(var(--radius) * 1.4); overflow:hidden; background:var(--ink-900);
    transition:border-color .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out; margin-bottom:28px; }
.blog-feature:hover { border-color:color-mix(in srgb, var(--brass-400) 55%, transparent); transform:translateY(-2px); box-shadow:0 20px 50px rgba(0,0,0,.35); }
.blog-feature__media { min-height:340px; }
.blog-feature__body { padding:36px; display:flex; flex-direction:column; gap:14px; align-items:flex-start; justify-content:center; }
.blog-feature__title { font-size:32px; line-height:1.12; margin:4px 0 0; }
.blog-feature__excerpt { color:var(--text-400); font-size:16px; line-height:1.6; margin:0; }
.blog-readmore { color:var(--brass-300); font-weight:600; margin-top:4px; }

/* Grid cards */
.blog-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; }
.blog-card { display:flex; flex-direction:column; text-decoration:none; color:inherit; background:var(--ink-900);
    border:1px solid var(--ink-700); border-radius:var(--radius); overflow:hidden;
    transition:border-color .2s ease-out, transform .2s ease-out, box-shadow .2s ease-out; }
.blog-card:hover { border-color:color-mix(in srgb, var(--brass-400) 55%, transparent); transform:translateY(-3px); box-shadow:0 16px 40px rgba(0,0,0,.32); }
.blog-card__media { aspect-ratio:16/10; }
.blog-card__body { padding:20px; display:flex; flex-direction:column; gap:9px; flex:1; }
.blog-card__title { margin:0; font-size:19px; line-height:1.25; }
.blog-card__excerpt { color:var(--text-400); font-size:14.5px; line-height:1.55; margin:0;
    display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.blog-card__body .blog-meta { margin-top:auto; }
.blog-empty { text-align:center; padding:48px; }

/* Pager */
.blog-pager { display:flex; align-items:center; justify-content:center; gap:18px; margin-top:48px; }
.blog-pager__btn { display:inline-flex; align-items:center; padding:10px 18px; border-radius:var(--radius-pill);
    border:1px solid var(--ink-700); color:var(--text-100); font-weight:600; text-decoration:none; transition:border-color .15s, background .15s; }
.blog-pager__btn:hover { border-color:var(--brass-400); background:var(--ink-800); }
.blog-pager__btn.is-disabled { opacity:.4; pointer-events:none; }
.blog-pager__status { font-family:var(--font-mono, monospace); font-size:13px; color:var(--text-400); }

/* Article (detail) */
.blog-hero-img { width:100%; max-height:460px; object-fit:cover; border-radius:calc(var(--radius) * 1.4); margin:8px 0 28px; display:block; }
.blog-body { line-height:1.75; color:var(--text-100); font-size:17px; }
.blog-body p { margin:0 0 18px; }
.blog-body img { max-width:100%; border-radius:var(--radius); }
.blog-body h2, .blog-body h3 { margin:32px 0 12px; }
.blog-body a { color:var(--brass-300); }
.blog-body blockquote { margin:24px 0; padding:8px 20px; border-left:3px solid var(--brass-400); color:var(--text-400); font-style:italic; }

@media (max-width:900px) {
    .blog-hero__title { font-size:44px; }
    .blog-feature { grid-template-columns:1fr; }
    .blog-feature__media { min-height:220px; aspect-ratio:16/9; }
    .blog-grid { grid-template-columns:repeat(2, 1fr); }
}
@media (max-width:600px) {
    .blog-hero { padding:40px 20px 20px; }
    .blog-hero__title { font-size:36px; }
    .blog-wrap { padding:0 20px 56px; }
    .blog-feature__body { padding:24px; }
    .blog-grid { grid-template-columns:1fr; }
}

/* Newsletter signup band (landing) */
.newsletter-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.newsletter-band__copy { min-width: 240px; flex: 1; }
.newsletter-form { display: flex; gap: 10px; flex: 1; min-width: 280px; max-width: 460px; }
.newsletter-form .input { flex: 1; }

/* ===== Messaging ===== */
.nav-badge-slot { margin-left: auto; }
.nav-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 9px; background: var(--brass-400); color: var(--ink-950);
    font-size: 11px; font-weight: 700; line-height: 1;
}
.msg-compose > summary { cursor: pointer; font-weight: 600; color: var(--brass-300); list-style: none; }
.msg-compose > summary::-webkit-details-marker { display: none; }
.msg-compose[open] > summary { margin-bottom: 4px; }
.msg-compose select[multiple] { padding: 6px; }

.msg-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--ink-700);
    text-decoration: none; color: inherit; transition: background .12s ease-out; }
.msg-row:last-child { border-bottom: none; }
.msg-row:hover { background: var(--ink-800); }
.msg-row__main { flex: 1; min-width: 0; }
.msg-row__title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.msg-row__preview { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.msg-row__time { font-size: 12px; white-space: nowrap; }
.msg-unread { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 9px; background: var(--brass-400); color: var(--ink-950); font-size: 11px; font-weight: 700; }

.msg-thread { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.msg-bubble-row { display: flex; gap: 8px; align-items: flex-end; }
.msg-bubble-row.is-mine { justify-content: flex-end; }
.msg-bubble__avatar { flex: none; }
.msg-row__avatar { flex: none; }
.msg-bubble { max-width: 72%; background: var(--ink-800); border: 1px solid var(--ink-700);
    border-radius: 14px; padding: 10px 14px; }
.msg-bubble-row.is-mine .msg-bubble { background: color-mix(in srgb, var(--brass-400) 18%, var(--ink-800));
    border-color: color-mix(in srgb, var(--brass-400) 35%, transparent); }
.msg-bubble__sender { font-size: 12px; font-weight: 600; color: var(--brass-300); margin-bottom: 3px; }
.msg-bubble__body { white-space: pre-wrap; line-height: 1.5; }
.msg-bubble__time { font-size: 11px; color: var(--text-400); margin-top: 4px; }
.msg-reply { display: flex; gap: 10px; align-items: flex-end; }
.msg-reply textarea { flex: 1; resize: vertical; }

/* Inline expense-entry form (Financials page) */
.expense-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 16px; align-items: end; margin-top: 12px; }
.expense-form .field { margin: 0; }
.expense-form__desc { grid-column: 1 / -1; }
.expense-form > .btn { justify-self: start; }

/* ---- Status pill ---- */
.pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 4px 12px; border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 600; border: 1px solid var(--ink-700);
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-400); }
.pill--green { color: var(--signal-green); border-color: color-mix(in srgb, var(--signal-green) 35%, transparent); }
.pill--green .pill__dot { background: var(--signal-green); }
.pill--amber { color: var(--signal-amber); border-color: color-mix(in srgb, var(--signal-amber) 35%, transparent); }
.pill--amber .pill__dot { background: var(--signal-amber); }
.pill--red { color: var(--signal-red); border-color: color-mix(in srgb, var(--signal-red) 35%, transparent); }
.pill--red .pill__dot { background: var(--signal-red); }
.pill--neutral { color: var(--text-400); }

/* ---- Meta chip (mono) ---- */
.metachip {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 3px 9px; border-radius: 6px;
    background: var(--ink-800); border: 1px solid var(--ink-700);
    font-family: var(--font-mono); font-size: 13px;
}
.metachip__label { color: var(--text-400); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.metachip__value { color: var(--text-100); }

/* ---- Data table ---- */
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-400); padding: 12px 16px; border-bottom: 1px solid var(--ink-700);
    position: sticky; top: 0; background: var(--ink-900);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--ink-700); }
.table tbody tr { transition: background .15s ease-out; }
.table tbody tr:hover { background: var(--ink-800); }

/* ---- Auth (cinematic) ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center;
    background: radial-gradient(1200px 600px at 50% -10%, #161b24 0%, var(--ink-950) 60%); }
.auth-card { width: 380px; max-width: calc(100vw - 32px); }
.auth-stack { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.auth-brand { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.auth-brand .accent { color: var(--brass-400); }
.auth-brand:hover { opacity: .9; }
.auth-brand__logo { height: 88px; width: auto; display: block; }
.auth-tagline { font-size: 13px; margin-top: -8px; }
.auth-back { color: var(--text-400); font-size: 14px; }
.auth-back:hover { color: var(--brass-300); }
.waveform-strip { display: flex; align-items: flex-end; gap: 3px; height: 36px; margin: 0 0 20px; }
.waveform-strip span { width: 4px; background: var(--brass-400); border-radius: 2px; opacity: .85; }

.empty-state { text-align: center; color: var(--text-400); padding: 48px 16px; }

/* ---- Public landing page (cinematic, §4.1) ---- */
.landing { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; }
.landing-nav__links { display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; font-size: 15px; }
.landing-nav__links a { color: var(--text-400); font-weight: 500; white-space: nowrap; }
.landing-nav__links a:hover { color: var(--text-100); }
.landing-nav__links a.btn { color: var(--ink-950); }
/* Hamburger for the public top nav — hidden on desktop, shown in the mobile media query. */
.landing-nav__toggle {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: transparent; border: 1px solid var(--ink-700); border-radius: var(--radius);
    color: var(--text-100); cursor: pointer;
    transition: background .15s ease-out;
}
.landing-nav__toggle:hover { background: var(--ink-800); }

.landing-hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.landing-waveform {
    position: absolute; inset: auto 0 0 0; height: 220px;
    display: flex; align-items: flex-end; gap: 3px; opacity: .18;
    -webkit-mask-image: linear-gradient(to top, #000, transparent);
            mask-image: linear-gradient(to top, #000, transparent);
}
.landing-waveform span { flex: 1; background: var(--brass-400); border-radius: 2px 2px 0 0; }
.landing-hero__inner { position: relative; max-width: 760px; }
.landing-eyebrow {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--brass-300); margin-bottom: 20px;
}
.landing-title { font-size: 64px; line-height: 1.02; margin: 0 0 24px; }
.landing-sub { font-size: 18px; color: var(--text-400); max-width: 620px; margin: 0 0 32px; }
.landing-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.landing-section { padding: 64px 0; border-top: 1px solid var(--ink-700); }
.landing-h2 { font-size: 28px; margin: 0 0 28px; }
.landing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.landing-grid .card h3 { margin: 0 0 8px; font-size: 18px; }
.landing-step__num { color: var(--brass-400); font-size: 14px; margin-bottom: 12px; }
/* catalog cards */
.catalog-card__wave { display: flex; align-items: flex-end; gap: 2px; height: 48px; opacity: .5; }
.catalog-card__wave span { flex: 1; background: var(--brass-400); border-radius: 2px 2px 0 0; }
.catalog-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.human-made { margin-top: 20px; border-color: color-mix(in srgb, var(--brass-400) 35%, var(--ink-700)); }
.human-made h3 { margin: 0 0 8px; font-size: 18px; }

/* trust strip */
.landing-trust {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px;
    padding: 28px 0 8px;
}
.landing-trust__item { display: flex; flex-direction: column; gap: 2px; }
.landing-trust__item .mono { font-size: 22px; font-weight: 500; }
.landing-trust__item .muted { font-size: 13px; }

/* custom-music split + genre marks */
.landing-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.landing-marks { display: flex; flex-wrap: wrap; gap: 8px; }
.landing-marks .metachip { font-size: 13px; }

/* monochrome logo wall (§4.1.6) */
.logo-wall {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
    background: var(--ink-700); border: 1px solid var(--ink-700); border-radius: var(--radius); overflow: hidden;
}
.logo-wall__mark {
    background: var(--ink-900); padding: 28px 16px; text-align: center;
    font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; font-size: 15px;
    color: var(--text-400); filter: grayscale(1); opacity: .7;
    transition: color .15s ease-out, opacity .15s ease-out;
}
.logo-wall__mark:hover { color: var(--brass-300); opacity: 1; }
.logo-wall__img { max-height: 30px; max-width: 130px; object-fit: contain; filter: grayscale(1) brightness(1.7); opacity: .8; transition: filter .15s ease-out, opacity .15s ease-out; }
.logo-wall__mark:hover .logo-wall__img { filter: none; opacity: 1; }

/* Dashboard — latest news widget */
.dash-news { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.dash-news__item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--ink-700, #20242b); }
.dash-news__item:first-child { border-top: none; }
.dash-news__title { font-weight: 600; }
.dash-news__date { margin-left: auto; font-size: 12px; white-space: nowrap; }

/* ===== Public catalog / Tracks page ===== */
.tracks-hero { max-width: 1080px; margin: 0 auto; padding: 56px 24px 8px; text-align: center; }
.tracks-hero .landing-sub { margin-left: auto; margin-right: auto; }
.tracks-search {
    display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 28px auto 0;
    background: var(--ink-800, #14171c); border: 1px solid var(--ink-700, #20242b);
    border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.tracks-search:focus-within { border-color: var(--brass-500, #b88a4a); }
.tracks-search__icon { opacity: .6; font-size: 14px; }
.tracks-search__input { flex: 1; background: transparent; border: none; outline: none; color: var(--text-100, #e8eaed); font-size: 15px; padding: 8px 4px; }
.tracks-search__btn { border-radius: 999px; padding: 10px 22px; }

.tracks-banner { max-width: 760px; margin: 16px auto 0; padding: 12px 18px; border-radius: 10px; font-size: 14px; }
.tracks-banner--ok { background: rgba(74,158,94,.12); border: 1px solid rgba(74,158,94,.4); color: #8fd3a3; }
.tracks-banner--err { background: rgba(180,69,47,.12); border: 1px solid rgba(180,69,47,.4); color: #e0795f; }

.tracks-list { max-width: 760px; margin: 28px auto 80px; padding: 0 24px; display: flex; flex-direction: column; gap: 14px; }
.tracks-count { font-size: 13px; }
.tracks-empty { text-align: center; color: var(--text-muted, #8a8f98); padding: 40px 20px; }

.track-card {
    background: var(--ink-800, #14171c); border: 1px solid var(--ink-700, #20242b); border-radius: 14px;
    padding: 18px 20px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.track-card:hover { border-color: rgba(184,138,74,.5); transform: translateY(-1px); box-shadow: 0 12px 36px rgba(0,0,0,.3); }
.track-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.track-card__title { margin: 0; font-family: var(--font-display); font-size: 20px; }
.track-card__artist { color: var(--brass-300, #e0b367); font-size: 14px; margin-top: 2px; }
.track-card__request { border-radius: 999px; flex: none; }
.track-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.track-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--ink-700, #20242b); color: var(--text-200, #c8ccd2); }
.track-chip--genre { border-color: rgba(184,138,74,.4); color: var(--brass-300, #e0b367); }
.track-chip--mood { color: var(--text-100, #e8eaed); }
.track-chip--explicit { border-color: rgba(180,69,47,.5); color: #e0795f; }

/* ===== Catalog two-column layout (filter rail + library rows) ===== */
.catalog-layout {
    display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px;
    max-width: 1400px; margin: 24px auto 80px; padding: 0 24px; align-items: start;
}
.catalog-layout__filters { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; }
.catalog-layout__list { min-width: 0; }
@media (max-width: 1024px) {
    .catalog-layout { grid-template-columns: 1fr; gap: 18px; }
    .catalog-layout__filters { position: static; max-height: none; overflow: visible; }
}

/* ===== Accordion filter rail (.tfilter) ===== */
.tfilter {
    background: var(--ink-800, #14171c); border: 1px solid var(--ink-700, #20242b);
    border-radius: 14px; overflow: hidden;
}
.tfilter__head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 10px; }
.tfilter__title { font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; }
.tfilter__clear { font-size: 12px; color: var(--brass-300, #e0b367); }
.tfilter__search {
    display: flex; align-items: center; gap: 8px; margin: 0 12px 8px;
    background: var(--ink-900, #0e1014); border: 1px solid var(--ink-700, #20242b);
    border-radius: 10px; padding: 4px 12px;
}
.tfilter__search:focus-within { border-color: var(--brass-500, #b88a4a); }
.tfilter__icon { opacity: .6; font-size: 13px; }
.tfilter__input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text-100, #e8eaed); font-size: 14px; padding: 7px 2px; }
.tfilter__range { display: flex; align-items: center; gap: 6px; }
.tfilter__range .input { width: 100%; padding: 8px 10px; font-size: 14px; }
.tfilter__dash { color: var(--text-muted, #8a8f98); }

.tfgroup { border-top: 1px solid var(--ink-700, #20242b); }
.tfgroup > summary {
    list-style: none; cursor: pointer; padding: 11px 16px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-200, #c8ccd2);
    user-select: none;
}
.tfgroup > summary::-webkit-details-marker { display: none; }
.tfgroup > summary::after { content: "▾"; font-size: 11px; color: var(--text-muted, #8a8f98); transition: transform .18s ease; }
.tfgroup[open] > summary::after { transform: rotate(180deg); }
.tfgroup > summary:hover { color: var(--brass-300, #e0b367); }
.tfgroup__body { padding: 2px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.tfgroup__scroll { max-height: 190px; overflow-y: auto; }

.tfopt { display: flex; align-items: center; gap: 9px; padding: 6px 6px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--text-200, #c8ccd2); }
.tfopt:hover { background: rgba(255,255,255,.04); }
.tfopt input { accent-color: var(--brass-500, #b88a4a); margin: 0; flex: none; }
.tfopt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Library track rows (.lib-row) ===== */
.lib-list__head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 8px; }
.lib-list__head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; }

.lib-row {
    display: flex; align-items: center; gap: 14px; padding: 10px 12px;
    border-radius: 10px; border: 1px solid transparent; transition: background .14s ease, border-color .14s ease;
}
.lib-row + .lib-row { border-top: 1px solid var(--ink-700, #20242b); border-radius: 0; }
.lib-row:hover { background: var(--ink-800, #14171c); border-color: rgba(184,138,74,.35); border-radius: 10px; }
.lib-row__art {
    flex: none; width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center;
    font-family: var(--font-display); font-size: 18px; color: var(--brass-100, #f6e2bd);
    background: linear-gradient(135deg, rgba(184,138,74,.42), rgba(20,23,28,.9));
    border: 1px solid rgba(184,138,74,.3);
}
.lib-row__art--img { padding: 0; overflow: hidden; background: var(--ink-900, #0e1014); }
.lib-row__art--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-row__id { flex: 0 0 188px; min-width: 0; }
.lib-row__title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-row__sub { color: var(--text-muted, #8a8f98); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-row__player { flex: 1 1 auto; min-width: 0; }
.lib-row__noaudio { font-size: 13px; padding: 8px 0; }
.lib-row__tags { flex: none; display: flex; gap: 6px; }
.lib-row__actions { flex: none; display: flex; align-items: center; gap: 8px; min-width: 92px; justify-content: flex-end; }
.lib-row__request { border-radius: 999px; }

/* Flatten the futuristic player so its waveform sits inline in the row */
.lib-row .fx-player { margin: 0; padding: 0; border: none; background: none; box-shadow: none; gap: 12px; overflow: visible; }
.lib-row .fx-player::after { display: none; }
.lib-row .fx-player__toggle { width: 38px; height: 38px; }
.lib-row .fx-player__wave { height: 34px; }

.track-card__sync { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-200, #c8ccd2); }
.track-card__player { width: 100%; margin-top: 14px; height: 40px; }

/* ===== Futuristic audio player (.fx-player) ===== */
.fx-player {
    margin-top: 16px;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 16px; border-radius: 16px; position: relative; overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
    border: 1px solid var(--ink-700, #20242b);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.fx-player::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: radial-gradient(120% 140% at 0% 50%, rgba(184,138,74,.16), transparent 55%);
    transition: opacity .35s ease;
}
.fx-player.is-playing { border-color: rgba(184,138,74,.55); box-shadow: 0 0 0 1px rgba(184,138,74,.18), 0 14px 40px rgba(0,0,0,.4); }
.fx-player.is-playing::after { opacity: 1; }

.fx-player__toggle {
    flex: none; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; padding: 0;
    display: grid; place-items: center; color: var(--brass-200, #f0cd8c);
    border: 1px solid rgba(184,138,74,.55);
    background: radial-gradient(circle at 32% 28%, rgba(184,138,74,.4), rgba(184,138,74,.06) 70%);
    transition: transform .15s ease, box-shadow .25s ease;
}
.fx-player__toggle:hover { transform: scale(1.06); box-shadow: 0 0 20px rgba(184,138,74,.5); }
.fx-player.is-playing .fx-player__toggle { box-shadow: 0 0 24px rgba(184,138,74,.55); }
.fx-player__toggle:focus-visible { outline: 2px solid var(--brass-400, #b88a4a); outline-offset: 2px; }

.fx-player__triangle { width: 0; height: 0; margin-left: 3px; border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.fx-player__pause { display: none; gap: 4px; }
.fx-player__pause i { width: 4px; height: 16px; border-radius: 2px; background: currentColor; }
.fx-player.is-playing .fx-player__triangle { display: none; }
.fx-player.is-playing .fx-player__pause { display: flex; }

.fx-player__wave { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 3px; height: 42px; cursor: pointer; outline: none; overflow: hidden; }
.fx-player__wave span {
    flex: 1 1 0; min-width: 1px; height: var(--h, 40%); border-radius: 2px;
    background: rgba(255,255,255,.13); transform-origin: center;
    transition: background .12s ease, box-shadow .2s ease;
}
.fx-player__wave span.is-lit {
    background: linear-gradient(180deg, var(--brass-200, #f0cd8c), var(--brass-500, #b88a4a));
    box-shadow: 0 0 7px rgba(184,138,74,.5);
}
.fx-player.is-playing .fx-player__wave span.is-lit { animation: fx-pulse .9s ease-in-out infinite; }
.fx-player__wave:focus-visible span { box-shadow: 0 0 0 1px rgba(184,138,74,.3); }

@keyframes fx-pulse { 0%, 100% { transform: scaleY(.82); } 50% { transform: scaleY(1.15); } }
@media (prefers-reduced-motion: reduce) { .fx-player.is-playing .fx-player__wave span.is-lit { animation: none; } }

.fx-player__time { flex: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-muted, #8a8f98); }
.fx-player__time [data-fx-cur] { color: var(--brass-300, #e0b367); }
.fx-player__sep { opacity: .4; margin: 0 3px; }

/* ----- Volume ----- */
.fx-player__vol { flex: none; display: flex; align-items: center; gap: 6px; }
.fx-player__mute { background: none; border: none; cursor: pointer; padding: 2px; line-height: 1; font-size: 14px; filter: grayscale(.3); opacity: .85; }
.fx-player__mute:hover { opacity: 1; filter: none; }
.fx-player__vol-range {
    -webkit-appearance: none; appearance: none; width: 72px; height: 4px; border-radius: 999px; cursor: pointer;
    background: var(--ink-700, #20242b); outline: none;
}
.fx-player__vol-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%;
    background: var(--brass-300, #e0b367); border: none; box-shadow: 0 0 6px rgba(184,138,74,.5); cursor: pointer;
}
.fx-player__vol-range::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%; border: none;
    background: var(--brass-300, #e0b367); box-shadow: 0 0 6px rgba(184,138,74,.5); cursor: pointer;
}
.fx-player__vol-range:focus-visible { box-shadow: 0 0 0 2px rgba(184,138,74,.35); }

/* In the compact library row, keep a slightly narrower slider but always visible */
.lib-row .fx-player__vol-range { width: 58px; }

.track-dialog { border: 1px solid var(--ink-700, #20242b); background: var(--ink-900, #0e1014); color: var(--text-100, #e8eaed); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.track-dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.track-dialog__form { padding: 24px; }
.track-dialog__head { display: flex; align-items: center; justify-content: space-between; }
.track-dialog__x { background: none; border: none; color: var(--text-muted, #8a8f98); font-size: 18px; cursor: pointer; line-height: 1; }
.track-dialog__x:hover { color: var(--text-100, #e8eaed); }
.track-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ----- Track detail modal ----- */
.track-dialog--detail { width: min(680px, calc(100vw - 32px)); position: relative; }
.track-dialog__x--float { position: absolute; top: 14px; right: 16px; font-size: 20px; z-index: 2; }
.tdetail { padding: 26px 28px 28px; }
.tdetail__head { padding-right: 28px; margin-bottom: 14px; }
.tdetail__title { margin: 0; font-family: var(--font-display); font-size: 24px; }
.tdetail__byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; color: var(--brass-300, #e0b367); font-size: 14px; }
.tdetail .fx-player { margin: 4px 0 14px; }
.tdetail__sync { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--text-100, #e8eaed); }
.tdetail__facts {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1px;
    background: var(--ink-700, #20242b); border: 1px solid var(--ink-700, #20242b); border-radius: 10px; overflow: hidden; margin-bottom: 16px;
}
.tdetail__fact { background: var(--ink-800, #14171c); padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.tdetail__fact-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted, #8a8f98); }
.tdetail__fact-v { font-size: 14px; color: var(--text-100, #e8eaed); }
.tdetail__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tdetail__section { margin-bottom: 14px; }
.tdetail__section h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted, #8a8f98); }
.tdetail__section p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-200, #c8ccd2); white-space: pre-line; }

.lib-row__actions { min-width: 150px; }

/* Legal / policy document pages */
.legal-doc { line-height: 1.7; color: var(--text-200, #c8ccd2); }
.legal-doc h2 { margin: 28px 0 8px; font-size: 18px; color: var(--text-100, #e8eaed); }
.legal-doc ul { padding-left: 20px; }
.legal-doc li { margin: 6px 0; }
.legal-doc a { color: var(--brass-300, #e0b367); }

/* Rich-text editor (Quill, snow theme) tuned for the dark UI */
.rte .ql-toolbar.ql-snow { border-color: var(--ink-700, #20242b); background: var(--ink-800, #15181d); border-radius: 8px 8px 0 0; }
.rte .ql-container.ql-snow { border-color: var(--ink-700, #20242b); background: var(--ink-900, #0e1014); border-radius: 0 0 8px 8px; font-family: inherit; font-size: 14px; }
.rte .ql-editor { min-height: 160px; color: var(--text-100, #e8eaed); }
.rte .ql-editor.ql-blank::before { color: var(--text-muted, #8a8f98); font-style: normal; }
.rte .ql-snow .ql-stroke { stroke: var(--text-200, #c8ccd2); }
.rte .ql-snow .ql-fill { fill: var(--text-200, #c8ccd2); }
.rte .ql-snow .ql-picker { color: var(--text-200, #c8ccd2); }
.rte .ql-snow.ql-toolbar button:hover .ql-stroke,
.rte .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--brass-300, #e0b367); }
.rte .ql-snow a { color: var(--brass-300, #e0b367); }

/* News Feed */
.news-feed { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.news-card { padding: 0; overflow: hidden; }
.news-card__banner { width: 100%; max-height: 420px; object-fit: cover; display: block; background: #000; }
video.news-card__banner { object-fit: contain; }
.news-card__content { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 18px; }
.news-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.news-card__pin { font-size: 12px; color: var(--brass-300, #e0b367); }
.news-card__date { font-size: 12px; margin-left: auto; }
.news-card__title { margin: 0; font-size: 19px; }
.news-card__audio { width: 100%; margin: 2px 0; }
.news-card__body { line-height: 1.65; font-size: 14px; color: var(--text-200, #c8ccd2); }
.news-card__body p { margin: 0 0 10px; }
.news-card__body :last-child { margin-bottom: 0; }
.news-card__body a { color: var(--brass-300, #e0b367); }
.news-card__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Knowledge article body — preserve the author's line breaks/paragraphs */
.knowledge-body { white-space: pre-wrap; line-height: 1.7; font-size: 15px; color: var(--text-200, #c8ccd2); margin-top: 12px; }

/* Tools board */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 8px; }
.tool-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tool-card__name { margin: 0; font-size: 17px; }
.tool-card__url { font-size: 12px; word-break: break-all; }
.tool-card__desc { margin: 2px 0 0; font-size: 14px; }
.tool-card__notes { margin: 0; font-size: 12px; }
.tool-card__actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.pager__summary { font-size: 13px; }
.pager__links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager__gap { color: var(--text-muted, #8a8f98); padding: 0 2px; }
.pager__current { background: var(--brass-500, #b88a4a); color: #1a1a1a; border-color: transparent; cursor: default; pointer-events: none; }

/* placements wall */
.placement-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.placement-card {
    background: var(--ink-900); border: 1px solid var(--ink-700); border-radius: var(--radius);
    box-shadow: var(--shadow-card); overflow: hidden; transition: transform .15s ease-out, border-color .15s ease-out;
}
.placement-card:hover { transform: translateY(-2px); border-color: var(--text-400); }
.placement-card__wave {
    display: flex; align-items: flex-end; gap: 2px; height: 56px; padding: 10px 16px 0;
    opacity: .5;
}
.placement-card__wave span { flex: 1; background: var(--brass-400); border-radius: 2px 2px 0 0; }
.placement-card__body { padding: 12px 16px 18px; }
.placement-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }

.landing-footer {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    padding: 40px 0; border-top: 1px solid var(--ink-700); margin-top: 24px;
}
.landing-footer__links { display: flex; gap: 20px; }
.landing-footer__links a { color: var(--text-400); }
.landing-footer__links a:hover { color: var(--brass-300); }

/* Footer social icons — drop to their own centered row below the links. */
.social-links { display: flex; gap: 12px; flex-basis: 100%; justify-content: center; margin-top: 8px; }
.social-links__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--ink-700); color: var(--text-400);
    transition: color .15s ease-out, border-color .15s ease-out, background .15s ease-out, transform .15s ease-out;
}
.social-links__icon:hover {
    color: var(--brass-300); border-color: var(--brass-400);
    background: var(--ink-800); transform: translateY(-2px);
}

/* contact form */
.contact-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 20px; align-items: start; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.contact-form textarea.input { resize: vertical; min-height: 120px; font-family: var(--font-ui); }
.contact-aside { display: flex; flex-direction: column; gap: 16px; }
.contact-aside .card h3 { margin: 0 0 8px; font-size: 16px; }
@media (max-width: 760px) {
    .contact-layout { grid-template-columns: 1fr; }
    .contact-form__row { grid-template-columns: 1fr; }
}

/* meet-the-team */
.team-card h3 { margin: 0 0 8px; font-size: 18px; }
.team-avatar {
    width: 48px; height: 48px; border-radius: 50%; margin-bottom: 14px;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 700; font-size: 16px;
    color: var(--ink-950); background: var(--brass-400);
}

@media (max-width: 720px) {
    .landing-split { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- Landing page (public) responsive ---- */
@media (max-width: 768px) {
    .landing { padding: 0 16px; }

    /* Nav collapses behind a hamburger; the links drop down as a panel under the header. */
    .landing-nav { padding: 16px 0; position: relative; }
    .landing-nav__toggle { display: inline-flex; }
    .landing-nav__links {
        position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
        flex-direction: column; align-items: stretch; gap: 4px;
        padding: 8px; background: var(--ink-900);
        border: 1px solid var(--ink-700); border-radius: var(--radius);
        box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
        display: none;
    }
    .landing-nav.is-open .landing-nav__links { display: flex; }
    .landing-nav__links a { padding: 10px 12px; border-radius: var(--radius); }
    .landing-nav__links a:not(.btn):hover { background: var(--ink-800); }
    .landing-nav__links a.btn { justify-content: center; text-align: center; margin-top: 4px; }

    .landing-hero { padding: 44px 0 56px; }
    .landing-hero__inner { max-width: 100%; }
    .landing-title { font-size: 40px; }
    .landing-sub { font-size: 16px; }
    .landing-section { padding: 44px 0; }
    .landing-h2 { font-size: 23px; margin-bottom: 20px; }
    .landing-trust { grid-template-columns: repeat(2, 1fr); padding: 20px 0 4px; }
    .landing-trust__item .mono { font-size: 19px; }
    .landing-footer { padding: 28px 0; gap: 10px; }
    .logo-wall, .placement-grid, .landing-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .landing-title { font-size: 31px; }
    .landing-h2 { font-size: 20px; }
    .landing-hero { padding: 30px 0 40px; }
    .landing-section { padding: 34px 0; }
    .landing-trust { grid-template-columns: 1fr 1fr; }
    .landing-cta { gap: 10px; }
    .landing-cta .btn { width: 100%; justify-content: center; }
    .logo-wall, .placement-grid, .landing-grid { grid-template-columns: 1fr; }
}

/* ---- Project grid / card ---- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.project-card {
    display: block; color: var(--text-100);
    background: var(--ink-900); border: 1px solid var(--ink-700);
    border-radius: var(--radius); box-shadow: var(--shadow-card);
    padding: 20px; transition: transform .15s ease-out, border-color .15s ease-out;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--text-400); color: var(--text-100); }

/* ---- Clearance panel ---- */
.add-contributor { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; align-items: center; }
.add-contributor .input { padding: 8px 10px; font-size: 14px; }
.add-contributor .btn { grid-column: 1 / -1; justify-self: start; }
.missing-list { margin: 14px 0 0; padding-left: 18px; color: var(--signal-amber); font-size: 14px; }
.missing-list li { margin: 4px 0; }

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

@media (max-width: 768px) {
    body { font-size: 15px; }
    h1 { font-size: 30px; }
    h2 { font-size: 19px; }

    /* App shell: single column; the sidebar becomes an off-canvas drawer behind a hamburger. */
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
        width: 264px; max-width: 82vw;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        transform: translateX(-100%);
        transition: transform .22s ease-out;
        box-shadow: 2px 0 24px rgba(0, 0, 0, .4);
    }
    .app.nav-open .sidebar { transform: translateX(0); }

    /* Drawer backdrop — covers the page while the menu is open. */
    .nav-backdrop {
        position: fixed; inset: 0; z-index: 50;
        background: rgba(0, 0, 0, .55);
        opacity: 0; pointer-events: none;
        transition: opacity .22s ease-out;
    }
    .app.nav-open .nav-backdrop { display: block; opacity: 1; pointer-events: auto; }

    .nav-toggle { display: inline-flex; }

    /* Topbar: tighten; the page title is already shown in the page <h1>. */
    .topbar { padding: 10px 16px; }
    .topbar > .muted { display: none; }
    .topbar__actions { gap: 10px; margin-left: auto; }

    .content { padding: 16px; }

    /* Tables: scroll horizontally inside their card instead of crushing columns.
       !important overrides the inline overflow:hidden on table cards. */
    .card[style*="overflow:hidden"], .card[style*="overflow: hidden"] { overflow-x: auto !important; }
    .table { min-width: 480px; }
    .table th, .table td { padding: 10px 12px; }

    .tiles { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .modal__dialog { max-width: none; }
}

@media (max-width: 480px) {
    h1 { font-size: 26px; }
    .content { padding: 14px 12px; }
    .card { padding: 16px; }
    .stat-tile .stat-num, .stat .n { font-size: 28px; }
}

/* ---- Avatars (profile images) ---- */
.avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ink-700, #2a2a30);
    color: var(--text-100, #fff);
    font-weight: 600;
    text-decoration: none;
    flex: none;
}
.avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar__initial { text-transform: uppercase; line-height: 1; }
.avatar--sm { width: 34px; height: 34px; font-size: 13px; border: 1px solid var(--ink-700, #333); }
.avatar--md { width: 40px; height: 40px; font-size: 15px; }
.avatar--lg { width: 96px; height: 96px; font-size: 34px; }

/* ---- Chips ---- */
.chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--ink-700, #25252b);
    color: var(--text-300, #cfcfd6);
    border: 1px solid var(--ink-700, #333);
}
.chip--red { color: var(--signal-red); border-color: color-mix(in srgb, var(--signal-red) 40%, transparent); }
.chip--tag { color: var(--brass-300, #e0b367); border-color: color-mix(in srgb, var(--brass-400, #c9a96a) 45%, transparent); }

/* ---- Kanban board ---- */
.board { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.board-column {
    flex: 1 0 240px;
    min-width: 240px;
    background: var(--ink-800, #161619);
    border: 1px solid var(--line, #2a2a30);
    border-radius: 12px;
    padding: 12px;
}
.board-column__head {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600; margin-bottom: 12px; padding: 0 2px;
}
.board-column__cards { min-height: 40px; display: flex; flex-direction: column; gap: 10px; }
.board-card {
    background: var(--ink-700, #1f1f24);
    border: 1px solid var(--line, #2e2e35);
    border-radius: 10px;
    padding: 12px;
    cursor: grab;
    transition: border-color .12s ease, transform .12s ease;
}
.board-card:hover { border-color: var(--brass, #c9a96a); }
.board-card--ghost { opacity: .4; }
.board-card__title { font-weight: 500; margin-bottom: 8px; }
.board-card__meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- Task drawer ---- */
.task-drawer {
    position: fixed; top: 0; right: 0; height: 100vh; width: 420px; max-width: 92vw;
    background: var(--ink-900, #0f0f12);
    border-left: 1px solid var(--line, #2a2a30);
    box-shadow: -16px 0 40px rgba(0,0,0,.4);
    transform: translateX(100%);
    transition: transform .2s ease;
    z-index: 60; overflow-y: auto;
}
.task-drawer.open { transform: translateX(0); }
.task-drawer__body { padding: 28px 24px; }
.task-comment {
    border-top: 1px solid var(--line, #26262c);
    padding: 12px 0;
}
.task-comment__head { display: flex; justify-content: space-between; margin-bottom: 4px; }

/* ---- Calendar ---- */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-grid--head { margin-bottom: 6px; }
.calendar-weekday { text-align: center; font-size: 12px; color: var(--text-400, #8a8a92); padding: 4px 0; }
.calendar-cell {
    min-height: 96px;
    background: var(--ink-800, #161619);
    border: 1px solid var(--line, #26262c);
    border-radius: 8px;
    padding: 6px;
}
.calendar-cell--muted { background: transparent; border-color: transparent; }
.calendar-cell--today { border-color: var(--brass, #c9a96a); }
.calendar-cell__num { font-size: 12px; color: var(--text-400, #8a8a92); margin-bottom: 4px; }
.calendar-event {
    font-size: 11px; padding: 2px 6px; border-radius: 5px; margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.calendar-event--task { background: color-mix(in srgb, var(--signal-green) 22%, transparent); color: var(--signal-green); }
.calendar-event--brief { background: color-mix(in srgb, var(--brass, #c9a96a) 22%, transparent); color: var(--brass, #c9a96a); }
.calendar-event--rush { background: color-mix(in srgb, var(--signal-red) 24%, transparent); color: var(--signal-red); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.legend-dot--task { background: var(--signal-green); }
.legend-dot--brief { background: var(--brass, #c9a96a); }

/* ===== Admin reports (status + financials) ===== */
.rep-funnel { display: flex; flex-direction: column; gap: 8px; }
.rep-row { display: flex; align-items: center; gap: 12px; }
.rep-row__label { flex: 0 0 150px; font-size: 13px; color: var(--text-200, #c8ccd2); }
.rep-row__bar { flex: 1; height: 14px; background: var(--ink-800, #14171c); border-radius: 999px; overflow: hidden; }
.rep-row__bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brass-500, #b88a4a), var(--brass-300, #e0b367)); }
.rep-row__count { flex: 0 0 90px; text-align: right; font-size: 13px; color: var(--text-100, #e8eaed); }

.rep-bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 8px; }
.rep-bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.rep-bars__bar { width: 70%; min-height: 4px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--brass-300, #e0b367), var(--brass-500, #b88a4a)); }
.rep-bars__label { font-size: 11px; color: var(--text-muted, #8a8f98); white-space: nowrap; }
