:root {
    --ink: #111827;
    --muted: #667085;
    --faint: #98a2b3;
    --line: #e5e9f1;
    --line-strong: #d3dbea;
    --paper: rgba(255, 255, 255, 0.9);
    --paper-solid: #ffffff;
    --soft: rgba(247, 249, 253, 0.78);
    --accent: #315fdc;
    --accent-deep: #17368f;
    --accent-soft: #eef3ff;
    --good: #27795d;
    --warn: #9b5a17;
    --shadow: 0 24px 70px rgba(36, 52, 92, 0.11);
    --shadow-soft: 0 10px 34px rgba(36, 52, 92, 0.08);
    --radius: 24px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(49, 95, 220, 0.16), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(23, 54, 143, 0.10), transparent 34rem),
        linear-gradient(135deg, #f7f9ff 0%, #ffffff 43%, #f5f7fb 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.42;
    background-image:
        linear-gradient(rgba(49, 95, 220, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(49, 95, 220, 0.055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
.button-link {
    min-height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--paper-solid);
    color: var(--ink);
    cursor: pointer;
    font-weight: 750;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover,
.button-link:hover,
.row:hover {
    border-color: rgba(49, 95, 220, 0.38);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
}

.button-link.compact,
.ghost-button {
    min-height: 36px;
    padding: 0 12px;
}

.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #315fdc, #244fcd);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(49, 95, 220, 0.22);
}

.wide {
    width: 100%;
}

.ghost-button {
    background: rgba(255, 255, 255, 0.62);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(49, 95, 220, 0.55);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(49, 95, 220, 0.10);
}

input,
select {
    height: 44px;
    padding: 0 12px;
}

textarea {
    min-height: 112px;
    resize: vertical;
    padding: 12px;
}

.shell {
    width: min(1460px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0 44px;
}

.shell-login {
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

.nav {
    position: sticky;
    top: 14px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
    border: 1px solid rgba(229, 233, 241, 0.86);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    padding: 10px 12px;
    box-shadow: 0 12px 38px rgba(36, 52, 92, 0.08);
    backdrop-filter: blur(18px);
}

.brand,
.nav-actions,
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.brand {
    gap: 9px;
    padding-left: 2px;
    font-weight: 850;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(49, 95, 220, 0.22);
}

.brand-mark.large {
    width: 52px;
    height: 52px;
    border-radius: 17px;
    font-size: 16px;
}

.nav-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 12px;
    color: var(--muted);
    font-weight: 720;
}

.nav-link:hover {
    color: var(--accent-deep);
    background: var(--accent-soft);
}

.nav form,
.actions form {
    display: inline;
}

.identity-pill {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 0 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.topbar {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 470px);
    gap: 24px;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 255, 0.76));
    padding: 28px;
    box-shadow: var(--shadow-soft);
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow.inverted {
    color: rgba(255, 255, 255, 0.72);
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    max-width: 800px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 0.98;
}

h2 {
    font-size: 21px;
}

.bio {
    color: var(--muted);
    line-height: 1.68;
}

.metrics,
.score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.metrics div,
.score-grid div {
    padding: 15px;
    border-right: 1px solid var(--line);
}

.metrics div:last-child,
.score-grid div:last-child {
    border-right: 0;
}

.metrics strong,
.score-grid strong,
.score {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 25px;
    color: var(--accent-deep);
}

.metrics span,
.score-grid span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.pulse {
    position: relative;
    margin: 18px 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.74);
    padding: 17px 18px;
    box-shadow: var(--shadow-soft);
}

.pulse::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    content: "";
    background: linear-gradient(var(--accent-deep), var(--accent));
}

.pulse p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.58;
}

.filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 160px 160px 160px 150px 110px 92px;
    gap: 10px;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    padding: 14px;
    box-shadow: var(--shadow-soft);
}

label span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 780;
}

.check {
    display: flex;
    gap: 8px;
    align-items: end;
    padding-bottom: 9px;
    color: var(--muted);
    font-size: 13px;
}

.check input,
.checks input {
    width: auto;
    height: auto;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 18px;
    align-items: start;
}

.table-panel,
.card,
.auth-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.table-panel {
    overflow: hidden;
}

.panel-head,
.table-head {
    display: grid;
    grid-template-columns: 78px 1.4fr 1fr 1fr 96px;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 13px 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.panel-head {
    grid-template-columns: 1fr auto;
    background: rgba(248, 250, 255, 0.76);
}

.feed-head,
.feed-row {
    grid-template-columns: 78px minmax(260px, 1.5fr) 190px minmax(220px, 1fr) 96px;
}

.explainer-head,
.explainer-row {
    grid-template-columns: 1.5fr 150px 120px 1fr 120px;
}

.rows {
    display: grid;
}

.row {
    display: grid;
    grid-template-columns: 78px 1.4fr 1fr 1fr 96px;
    gap: 14px;
    min-height: 86px;
    align-items: start;
    border: 1px solid transparent;
    border-bottom-color: var(--line);
    padding: 14px 16px;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.row:last-child {
    border-bottom-color: transparent;
}

.row.active {
    outline: 2px solid rgba(49, 95, 220, 0.42);
    outline-offset: -2px;
}

.row b,
.profile-title b {
    display: block;
}

.row small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags em,
.role {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    padding: 4px 8px;
    font-size: 11px;
    font-style: normal;
    font-weight: 720;
    color: #475467;
}

.loose {
    margin-top: 14px;
}

.status {
    display: inline-flex;
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--good);
    background: rgba(39, 121, 93, 0.06);
    font-size: 12px;
    font-weight: 800;
}

.meta-stack {
    display: grid;
    gap: 5px;
}

.meta-stack em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.warn {
    color: var(--warn) !important;
    font-weight: 850;
}

.side {
    display: grid;
    gap: 16px;
}

.card {
    padding: 18px;
}

.narrow {
    max-width: 720px;
}

.profile-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.icon-link {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--accent-deep);
    font-weight: 850;
}

.score-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 14px;
}

.score-grid div {
    padding: 12px;
}

.score-grid strong {
    font-size: 18px;
}

.snippets,
.queue,
.stack {
    display: grid;
    gap: 11px;
    margin-top: 14px;
}

.snippets article,
.queue article,
.notice,
.signal-result {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.64);
    padding: 13px;
}

.snippets header,
.queue article {
    display: grid;
    gap: 4px;
}

.snippets header {
    grid-template-columns: 1fr auto;
}

.snippets span,
.queue span,
.signal-result span,
.signal-result small {
    color: var(--muted);
    font-size: 12px;
}

.snippets p,
.queue p,
.signal-result p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.58;
}

.notice {
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.5;
}

.notice.bad {
    border-color: rgba(159, 111, 111, 0.55);
}

.empty {
    border: 1px dashed var(--line-strong);
    border-radius: 18px;
    color: var(--muted);
    padding: 18px;
    line-height: 1.6;
}

.split-form {
    grid-template-columns: 1fr 1fr;
}

.split-form .full {
    grid-column: 1 / -1;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 13px;
}

legend {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.checks label {
    color: var(--muted);
    font-size: 13px;
}

.role-investor {
    border-color: rgba(169, 120, 34, 0.46);
}

.role-founder {
    border-color: rgba(55, 109, 161, 0.46);
}

.role-operator {
    border-color: rgba(57, 115, 92, 0.46);
}

.lower {
    margin-top: 18px;
}

.dupe-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 190px;
    gap: 12px;
}

.admin-item .actions {
    margin-top: 10px;
}

.signal-result {
    margin-top: 12px;
}

.signal-result > div:first-child {
    display: flex;
    justify-content: space-between;
}

.auth-shell {
    height: 100vh;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(400px, 0.95fr) minmax(360px, 520px);
    gap: clamp(24px, 5vw, 78px);
    align-items: center;
    padding: 24px clamp(20px, 5vw, 72px) 24px 24px;
}

.auth-story {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 34px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(135deg, #18358d, #315fdc);
    background-size: 38px 38px, 38px 38px, auto;
    color: #fff;
    padding: clamp(30px, 5vw, 58px);
    box-shadow: 0 28px 80px rgba(24, 53, 141, 0.24);
}

.auth-story h1 {
    max-width: 680px;
    font-size: clamp(42px, 5.6vw, 66px);
    color: #fff;
}

.auth-story p {
    max-width: 560px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 19px;
    line-height: 1.7;
}

.auth-feature-list {
    display: grid;
    gap: 18px;
    margin-top: 42px;
}

.auth-feature-list span {
    display: flex;
    gap: 14px;
    align-items: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 17px;
    font-weight: 780;
}

.auth-feature-list b,
.trusted-strip span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

.trusted-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 42px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    padding-top: 22px;
}

.trusted-strip small {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 720;
}

.auth-card {
    border-radius: 34px;
    padding: clamp(24px, 3vw, 34px);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.auth-card-head {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 4px;
    color: var(--faint);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.divider::before,
.divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background: var(--line);
}

@media (max-width: 1180px) {
    .filters {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .auth-shell {
        height: auto;
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .auth-story {
        min-height: auto;
    }
}

@media (max-height: 820px) and (min-width: 1181px) {
    .auth-shell {
        min-height: 0;
        padding: 16px clamp(18px, 4vw, 48px) 16px 16px;
    }

    .auth-story {
        min-height: calc(100vh - 32px);
        padding: 34px;
    }

    .auth-story h1 {
        font-size: clamp(38px, 4.4vw, 54px);
    }

    .auth-story p {
        font-size: 17px;
        line-height: 1.55;
    }

    .auth-feature-list,
    .trusted-strip {
        margin-top: 24px;
    }

    .auth-feature-list {
        gap: 12px;
    }

    .auth-feature-list span {
        font-size: 16px;
    }

    .trusted-strip small {
        display: none;
    }

    .auth-card {
        padding: 28px;
    }
}

@media (max-width: 1100px) {
    .topbar,
    .layout,
    .dupe-grid {
        grid-template-columns: 1fr;
    }

    .feed-head,
    .feed-row {
        grid-template-columns: 78px 1fr;
    }

    .feed-row > span:nth-child(n + 3) {
        grid-column: 2;
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(100vw - 22px, 1460px);
        padding-top: 12px;
    }

    .nav {
        position: static;
        align-items: flex-start;
        border-radius: 22px;
    }

    .nav,
    .nav-actions,
    .metrics,
    .filters,
    .score-grid,
    .split-form {
        grid-template-columns: 1fr;
    }

    .nav {
        display: grid;
    }

    .metrics div,
    .score-grid div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .metrics div:last-child,
    .score-grid div:last-child {
        border-bottom: 0;
    }

    .topbar {
        padding: 20px;
    }

    .table-head {
        display: none;
    }

    .row,
    .feed-row,
    .explainer-row {
        grid-template-columns: 68px 1fr;
    }

    .row > span:nth-child(n + 3),
    .explainer-row > span:nth-child(n + 2),
    .explainer-row > strong {
        grid-column: 2;
    }

    .auth-story {
        min-height: auto;
        padding: 28px;
    }

    .auth-shell {
        min-height: 100vh;
        padding: 12px;
    }

    .auth-feature-list,
    .trusted-strip {
        margin-top: 28px;
    }
}
