/* ─────────────────────────────────────────────────────────────────────────
   Trial IQ Investor Data Room
   Brand: navy #1E3A5F + cyan #1BA3D1 (matches Trial IQ logo)
   Type:  IBM Plex Sans (clinical / serious-tech) + IBM Plex Mono (tabular)
   ───────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Serif:ital,wght@0,400;0,500;1,400&display=swap');

:root {
    /* ── Brand ──────────────────────────────────── */
    --navy:         #1E3A5F;        /* primary brand */
    --navy-deep:    #122742;        /* hover / pressed */
    --navy-soft:    #4A6A88;        /* secondary text on dark */
    --cyan:         #1BA3D1;        /* accent / active */
    --cyan-deep:    #1488B0;        /* cyan hover */
    --cyan-soft:    #E6F5FB;        /* cyan tint background */

    /* ── Surfaces ───────────────────────────────── */
    --bg:           #F6F9FC;        /* page bg, cool clinical white */
    --bg-2:         #EDF1F7;        /* secondary surface */
    --surface:      #FFFFFF;        /* cards / hero */
    --ink:          #0E1A2E;        /* near-black with subtle navy cast */
    --ink-2:        #2A3950;        /* secondary text */
    --muted:        #6B7F95;        /* tertiary / metadata */
    --rule:         #DDE3EC;        /* dividers */
    --rule-soft:    #ECF0F5;        /* subtle dividers */

    /* ── Type ───────────────────────────────────── */
    --sans:   'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    --serif:  'IBM Plex Serif', Georgia, serif;
    --mono:   'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

    /* ── Layout ─────────────────────────────────── */
    --w:      72rem;
    --gutter: 1.5rem;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--cyan);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 120ms ease, border-color 120ms ease;
}
a:hover { color: var(--cyan-deep); border-bottom-color: var(--cyan); }

/* ─── LOGIN ──────────────────────────────────────────────────────────── */

.is-login {
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, var(--cyan-soft) 0%, transparent 60%),
        var(--bg);
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 3rem 1.5rem;
}

.login__card {
    width: 100%;
    max-width: 26rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 2.75rem 2.5rem 2.25rem;
    box-shadow:
        0 1px 0 rgba(14, 26, 46, 0.02),
        0 4px 20px -4px rgba(14, 26, 46, 0.08),
        0 24px 64px -32px rgba(30, 58, 95, 0.18);
}

.login__mark {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    background: var(--navy);
    color: white;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    border-radius: 8px;
    margin-bottom: 1.75rem;
    position: relative;
}
.login__mark::after {
    content: '';
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    background: var(--cyan);
    border-radius: 50%;
    top: -0.125rem;
    right: -0.125rem;
    box-shadow: 0 0 0 3px var(--surface);
}

.login__brand { margin-bottom: 2rem; }

.login__company {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--cyan-deep);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.login__title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.625rem;
    color: var(--ink);
}

.login__subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.login__form { display: flex; flex-direction: column; gap: 0.5rem; }

.login__label {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-top: 1rem;
    font-weight: 500;
}

.login__input {
    appearance: none;
    border: 1.5px solid var(--rule);
    background: var(--bg);
    font-family: var(--sans);
    font-size: 0.9375rem;
    padding: 0.75rem 0.875rem;
    color: var(--ink);
    outline: none;
    border-radius: 6px;
    transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.login__input:focus {
    border-color: var(--cyan);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--cyan-soft);
}

.login__btn {
    margin-top: 1.5rem;
    background: var(--navy);
    color: white;
    border: 0;
    padding: 0.875rem 1.125rem;
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    transition: background 150ms ease, transform 80ms ease;
}
.login__btn:hover { background: var(--navy-deep); }
.login__btn:active { transform: translateY(1px); }

.login__error {
    margin-top: 0.875rem;
    padding: 0.625rem 0.75rem;
    background: #FBEBE9;
    border: 1px solid #F4C8C2;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #9C2B1F;
}

.login__foot {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule-soft);
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.55;
}

.login__sig {
    position: absolute;
    bottom: 1.5rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    text-transform: uppercase;
}

/* ─── DASHBOARD ──────────────────────────────────────────────────────── */

.is-dashboard { background: var(--bg); }

.topbar {
    background: var(--navy);
    color: white;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 3px solid var(--cyan);
}

.topbar__inner {
    max-width: var(--w);
    margin: 0 auto;
    padding: 0.875rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8125rem;
}

.topbar__left { display: flex; align-items: center; gap: 0.625rem; }

.topbar__mark {
    display: inline-grid;
    place-items: center;
    width: 1.625rem;
    height: 1.625rem;
    background: var(--cyan);
    color: white;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 0.7rem;
    border-radius: 5px;
}
.topbar__company { font-weight: 600; letter-spacing: -0.01em; }
.topbar__sep { color: rgba(255, 255, 255, 0.4); }
.topbar__page {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.topbar__right { display: flex; align-items: center; gap: 1.25rem; }
.topbar__viewer {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
}
.topbar__viewer strong { color: white; font-weight: 500; }
.topbar__logout {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    border: 0;
}
.topbar__logout:hover { color: white; border-bottom-color: white; }

.room {
    max-width: var(--w);
    margin: 0 auto;
    padding: 3.5rem var(--gutter) 5rem;
}

/* Hero */
.hero {
    border-bottom: 1px solid var(--rule);
    padding-bottom: 3rem;
    margin-bottom: 3rem;
    position: relative;
}

.hero__eyebrow {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--cyan-deep);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}
.hero__eyebrow::before {
    content: '';
    width: 0.4rem;
    height: 0.4rem;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--cyan-soft);
}

.hero__title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
    color: var(--ink);
}
.hero__title--soft {
    display: block;
    color: var(--navy-soft);
    font-weight: 300;
    font-style: italic;
    font-family: var(--serif);
    letter-spacing: -0.02em;
}

.hero__lede {
    max-width: 38rem;
    font-size: 1.0625rem;
    color: var(--ink-2);
    line-height: 1.6;
    margin: 0 0 2.5rem;
}

.hero__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0;
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}
.hero__meta > div {
    padding: 0 1.25rem 0 0;
    border-right: 1px solid var(--rule-soft);
}
.hero__meta > div:last-child { border-right: 0; }
.hero__meta dt {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.375rem;
    font-weight: 500;
}
.hero__meta dd {
    font-family: var(--sans);
    font-size: 1.5rem;
    line-height: 1;
    margin: 0;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.02em;
}

/* Table of contents */
.toc {
    margin-bottom: 4rem;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 1.75rem 2rem;
    box-shadow: 0 1px 0 rgba(14, 26, 46, 0.02), 0 2px 10px -4px rgba(14, 26, 46, 0.06);
}

.toc__title {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-bottom: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.toc__title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule-soft);
}

.toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    column-gap: 2rem;
    row-gap: 0;
}
.toc__list li { border-top: 1px solid var(--rule-soft); }
.toc__list li:nth-child(-n+2) { border-top: 0; }
@media (max-width: 47rem) {
    .toc__list { grid-template-columns: 1fr; }
    .toc__list li { border-top: 1px solid var(--rule-soft); }
    .toc__list li:first-child { border-top: 0; }
}

.toc__list a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 0.875rem;
    padding: 0.75rem 0.25rem;
    color: var(--ink);
    border: 0;
    border-radius: 4px;
    transition: background 100ms ease;
}
.toc__list a:hover { background: var(--bg-2); }
.toc__list a:hover .toc__label { color: var(--cyan-deep); }

.toc__num {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 0.04em;
    font-weight: 500;
}
.toc__label {
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 120ms ease;
}
.toc__count {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--bg-2);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-weight: 500;
}

/* Section */
.sec {
    margin-bottom: 3.5rem;
    scroll-margin-top: 5rem;
}

.sec__head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--navy);
}
.sec__num {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--cyan-deep);
    letter-spacing: 0.06em;
    font-weight: 500;
}
.sec__title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.625rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--ink);
}

/* File list */
.files {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file {
    display: grid;
    grid-template-columns: 4rem 1fr 5rem 7rem 6rem;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0.625rem;
    border-bottom: 1px solid var(--rule-soft);
    border-radius: 6px;
    transition: background 120ms ease;
}
.file:hover { background: var(--surface); box-shadow: 0 1px 3px rgba(14, 26, 46, 0.04); }

.file__kind {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--rule);
    color: var(--muted);
    background: var(--surface);
    border-radius: 4px;
    width: max-content;
}
.file__kind--pdf  { color: #B92F1F; border-color: #F4C8C2; background: #FDF1EF; }
.file__kind--doc  { color: #1488B0; border-color: #BFE3F0; background: #E6F5FB; }
.file__kind--xls  { color: #1F6E3D; border-color: #BFE0CC; background: #E8F5ED; }
.file__kind--deck { color: #8C5A12; border-color: #EBD5B0; background: #FAF1DD; }
.file__kind--img  { color: #5C2F7A; border-color: #D9C4E5; background: #F2EAF7; }
.file__kind--vid  { color: #7A1F4D; border-color: #E8C4D5; background: #F7E8EE; }
.file__kind--zip  { color: #4D5A66; border-color: #D5DBE0; background: #EEF1F4; }

.file__name {
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    border: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file__name:hover { color: var(--cyan-deep); border: 0; }

.file__size, .file__date {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.file__action {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--navy);
    text-align: right;
    border: 0;
    font-weight: 500;
}
.file__action:hover { color: var(--cyan-deep); }
.file__action::after {
    content: ' ↗';
    color: var(--cyan);
    margin-left: 0.125rem;
}

@media (max-width: 47rem) {
    .file {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "kind name action"
            "kind meta meta";
        row-gap: 0.25rem;
    }
    .file__kind { grid-area: kind; }
    .file__name { grid-area: name; white-space: normal; }
    .file__size { grid-area: meta; }
    .file__date { display: none; }
    .file__action { grid-area: action; }
}

/* Empty state */
.empty {
    background: var(--surface);
    border: 1px dashed var(--rule);
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    color: var(--muted);
}
.empty p { margin: 0 0 0.75rem; }
.empty__hint { font-size: 0.875rem; line-height: 1.7; }
.empty code {
    font-family: var(--mono);
    font-size: 0.85em;
    background: var(--bg-2);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--rule-soft);
    color: var(--navy);
}

/* Footer */
.room__foot {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-weight: 500;
}

/* Print */
@media print {
    .topbar, .room__foot, .file__action { display: none; }
    body { background: white; }
}
