/* Sweetwater Private Equity brand palette (sweetwaterpe.com):
   water blue #76bdd2 / #559baf, slate ink #374754 / #5a636c,
   warm sand #b7ad93 / #e8ddc2, light neutrals #f4f4f4. */
:root {
    --sw-ink: #374754;
    --sw-muted: #5a636c;
    --sw-line: #e3e2da;
    --sw-canvas: #f5f4f0;
    --sw-blue: #38707f;
    --sw-blue-deep: #2f6273;
    --sw-sky: #76bdd2;
    --sw-sand: #b7ad93;
    --sw-bronze: #a2946b;
}

/* Pill buttons, matching the site's rounded CTAs. */
.btn {
    border-radius: calc(infinity * 1px);
}

/* Align DaisyUI semantic colors with the brand. */
[data-theme="light"] {
    --color-primary: #38707f;
    --color-primary-content: #ffffff;
    --color-secondary: #b7ad93;
    --color-secondary-content: #374754;
    --color-accent: #76bdd2;
    --color-accent-content: #374754;
    --color-neutral: #374754;
    --color-neutral-content: #ffffff;
    --color-info: #76bdd2;
    --color-info-content: #374754;
}

html {
    background: #374754;
}

body {
    min-height: 100vh;
    color: var(--sw-ink);
    font-family: Mulish, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.waterline-bg {
    background-color: #374754;
    background-image:
        repeating-radial-gradient(ellipse at -10% 30%, transparent 0 54px, rgb(38 51 62 / 0.35) 55px 57px),
        repeating-radial-gradient(ellipse at 110% 70%, transparent 0 70px, rgb(38 51 62 / 0.28) 71px 73px);
}

.app-shell {
    background: var(--sw-canvas);
    box-shadow: 0 26px 70px rgb(23 33 41 / 0.28);
}

.soft-card {
    border: 1px solid var(--sw-line);
    background: rgb(255 255 255 / 0.72);
    box-shadow: 0 8px 24px rgb(55 71 84 / 0.05);
}

.ranking-table tbody tr {
    border-color: var(--sw-line);
}

.companies-ranking-table thead th,
.funds-ranking-table thead th {
    color: var(--sw-ink);
    padding-block: 0.375rem;
}

.ranking-table tbody tr:hover {
    background: rgb(85 155 175 / 0.06);
}

.ranking-table tr[data-row-link] {
    cursor: pointer;
}

.ranking-table tr[data-row-link]:focus-within {
    background: rgb(85 155 175 / 0.06);
}

.fund-manager {
    /* Reserve two lines, while allowing longer manager names to grow. */
    min-height: 2lh;
    display: flex;
    align-items: center;
}

/* Ranking density: keep score widths consistent and give names the freed space. */
.ranking-table {
    --ranking-score-scale: 0.8;
    --ranking-score-base: 8rem;
    --ranking-completeness-base: 10.86rem;
}
.funds-ranking-table {
    --ranking-score-base: 7.5rem;
    --ranking-completeness-base: 10.36rem;
}
.ranking-table .ranking-rank {
    width: 3.25rem;
    padding-inline: 0.5rem;
}
.ranking-table .ranking-score {
    --score-column-width: calc(var(--ranking-score-base) * var(--ranking-score-scale));
    width: var(--score-column-width);
    padding-inline: 0.5rem;
}
.ranking-table .ranking-completeness {
    --score-column-width: calc(var(--ranking-completeness-base) * var(--ranking-score-scale));
}
.ranking-table .ranking-score > div {
    min-width: 0;
    width: calc(var(--score-column-width) - 1rem);
}
.ranking-table th.ranking-score .link {
    white-space: normal;
    overflow-wrap: anywhere;
}

.companies-ranking-table .company-name-column {
    width: var(--company-name-width, 11.5rem);
    padding-inline: 0.75rem;
}

.companies-ranking-table .company-founded-column {
    width: 5.5rem;
    padding-inline: 0.5rem;
    text-align: center;
}

.companies-ranking-table .company-name-link {
    width: calc(var(--company-name-width, 11.5rem) - 1.5rem);
    overflow-wrap: anywhere;
}

.score-progress {
    height: 0.38rem;
}

.muted {
    color: var(--sw-muted);
}

.entity-mark {
    background: linear-gradient(145deg, #38707f, #76bdd2);
}

.priority-badge {
    display: inline-flex;
    height: 1.15rem;
    min-width: 1.8rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    border-radius: 9999px;
    padding: 0 0.35rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
}

.priority-badge-p0 {
    border-color: #b5a06b;
    background: #eee2c3;
    color: #62512b;
}

.priority-badge-p1 {
    border-color: #559baf;
    background: #dceff4;
    color: #285867;
}

.priority-badge-p2 {
    border-color: #9ba7af;
    background: #eef1f2;
    color: #4c5962;
}

.bulk-format-badge {
    border: 1px solid #cbdcdf;
    background: rgb(255 255 255 / 0.65);
    box-shadow: 0 6px 18px rgb(55 71 84 / 0.05);
}

.bulk-type-option {
    border-color: #d9ddd9;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.bulk-type-option:hover {
    border-color: #9fc5cf;
}

.bulk-type-option:has(input:checked) {
    border-color: #559baf;
    background: #f2fafb;
    box-shadow: 0 0 0 2px rgb(85 155 175 / 0.12);
}

.bulk-type-check {
    border-color: #cbd2d3;
    color: transparent;
}

.bulk-type-option:has(input:checked) .bulk-type-check {
    border-color: #38707f;
    background: #38707f;
    color: #fff;
}

.bulk-drop-zone {
    border-color: #b9d0d5;
    background: #f9fcfc;
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.bulk-drop-zone:hover,
.bulk-drop-zone-active {
    border-color: #559baf;
    background: #f0f8fa;
    transform: translateY(-1px);
}

.bulk-drop-zone-ready {
    border-style: solid;
    border-color: #6da68a;
    background: #f1f8f4;
}

.bulk-column-chip {
    border: 1px solid #dce1df;
    border-radius: 0.55rem;
    background: #fff;
    padding: 0.3rem 0.48rem;
    color: #4b5a64;
    font-size: 0.68rem;
}

.bulk-status-success {
    border-color: #a9ceb9;
    background: #edf7f1;
    color: #315f47;
}

.bulk-status-error {
    border-color: #dbb5aa;
    background: #fbefec;
    color: #804437;
}

.alert-page-mark {
    border: 1px solid #dbc98f;
    background: linear-gradient(145deg, #f6e8b9, #e4c66f);
    color: #5d4915;
    box-shadow: 0 8px 18px rgb(157 125 44 / 0.15);
}

.alert-kind-company {
    border: 1px solid #b9dce5;
    background: #dceff4;
    color: #2f6273;
}

.alert-kind-fund {
    border: 1px solid #dfd0a8;
    background: #f2ead5;
    color: #755c27;
}

.alert-entity-row {
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.alert-entity-row:hover {
    border-color: #9fc5cf;
    box-shadow: 0 5px 14px rgb(55 71 84 / 0.07);
    transform: translateY(-1px);
}

.alert-empty-mark {
    border: 1px solid #bfd8cb;
    background: #e5f1eb;
    color: #46705c;
}

.record-growth-chart {
    width: 100%;
    min-height: 310px;
}

.record-growth-chart svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.growth-grid {
    stroke: #dfe2de;
    stroke-width: 1;
}

.growth-grid-vertical {
    stroke-dasharray: 3 6;
    opacity: 0.72;
}

.growth-axis-label {
    fill: #69747d;
    font-family: Mulish, Inter, sans-serif;
    font-size: 11px;
    font-weight: 600;
}

.growth-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.growth-companies {
    stroke: #38707f;
}

.growth-funds {
    stroke: #b08d45;
}

.growth-hit {
    fill: transparent;
    stroke: transparent;
    stroke-width: 2;
}

.growth-hit:hover,
.growth-hit:focus {
    fill: #fff;
    outline: none;
}

.growth-hit.growth-companies:hover,
.growth-hit.growth-companies:focus {
    stroke: #38707f;
}

.growth-hit.growth-funds:hover,
.growth-hit.growth-funds:focus {
    stroke: #b08d45;
}

@media (min-width: 1024px) {
    .app-shell {
        min-height: calc(100vh - 3rem);
        border-radius: 1.75rem;
        /* clip, not hidden: hidden creates a scroll container, which
           disables the drawer sidebar's sticky positioning and let it
           scroll out of view on long pages. clip only clips the rounded
           corners. */
        overflow: clip;
    }
}

/* /scoring: a parameter that differs from the built-in default. */
.config-changed {
    border-color: #d9a441;
    box-shadow: inset 0 0 0 1px #d9a441;
}

/* DaisyUI tooltips keep their bubble laid out (just transparent) while
   hidden, so a bubble near the viewport edge widens the document and gives
   the page a horizontal scrollbar on narrow screens. Don't render it until
   the tooltip is actually shown, and never let it exceed the viewport. */
.tooltip:not(:hover):not(.tooltip-open):not(:has(:focus-visible))::before,
.tooltip:not(:hover):not(.tooltip-open):not(:has(:focus-visible))::after {
    display: none;
}

.tooltip[data-tip]::before {
    max-width: min(20rem, calc(100vw - 2rem));
}

/* On phones there is no room beside the trigger for a bubble, and a bubble
   hanging off the right edge widens the page. Show tooltips as a bar pinned
   to the bottom of the viewport instead: always fully visible, never wider
   than the screen. The arrow has nothing to point at, so it goes. */
@media (max-width: 639px) {
    .tooltip.tooltip[data-tip]::before {
        position: fixed;
        inset: auto 1rem 1rem 1rem;
        width: auto;
        max-width: none;
        transform: none;
        text-align: left;
        z-index: 50;
    }

    .tooltip.tooltip::after {
        display: none;
    }
}

/* The ? help marker used across the platform: a small circled badge
   instead of a bare question mark trailing the label. */
.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.6rem;
    height: 0.6rem;
    flex: none;
    align-self: center;
    border: 1px solid #c3cad1;
    border-radius: 9999px;
    color: #97a1ab;
    font-size: 0.45rem;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    user-select: none;
}

.help-tip:hover {
    border-color: #38707f;
    color: #38707f;
}

/* Horizontally scrolling boxes: a slim classic scrollbar that takes its own
   layout space instead of the overlay bar that draws on top of the last row.
   The ::-webkit-scrollbar styles are what switch Chrome/Safari from overlay
   to classic rendering — and Chrome disables them on any element whose
   scrollbar-width/scrollbar-color computes to non-auto. DaisyUI sets
   scrollbar-color on :root and it inherits, so it must be reset here; the
   standard properties are then reintroduced for Firefox only. */
.overflow-x-auto {
    scrollbar-color: auto;
}

@supports (-moz-appearance: none) {
    .overflow-x-auto {
        scrollbar-width: thin;
        scrollbar-color: #c9c7bc transparent;
    }
}

.overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #c9c7bc;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: transparent;
}

/* The one search box: typeahead dropdown shared by the rankings card, the
   header and the mobile drawer (round 2, item 1). */
.search-box-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 24rem;
    overflow-y: auto;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    border: 1px solid var(--sw-line);
    border-radius: 0.9rem;
    background: #fff;
    color: #374754;
    box-shadow: 0 14px 36px rgb(55 71 84 / 0.16);
    text-align: left;
}

.search-box-group {
    padding: 0.5rem 0.75rem 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a2946b;
}

.search-box-option {
    border-radius: 0.6rem;
    cursor: pointer;
}

.search-box-option.is-active,
.search-box-option:hover {
    background: #eef7f9;
}

.search-box-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    color: #374754;
    text-decoration: none;
}

.search-box-id {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #85909b;
}

.search-box-empty {
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    color: #6e7883;
}

.search-box-action {
    margin-top: 0.25rem;
    border-top: 1px solid var(--sw-line);
    border-radius: 0 0 0.6rem 0.6rem;
    font-weight: 600;
    color: #2f6273;
}

/* Fit compact numeric columns to their headings and values. */
.companies-ranking-table .company-compact-column {
    width: 1%;
    white-space: nowrap;
    padding-inline: 0.5rem;
}
.funds-ranking-table .ranking-gqs {
    --score-column-width: 3.5rem;
}

.companies-ranking-table th,
.companies-ranking-table td,
.companies-ranking-table .company-founded-column,
.funds-ranking-table th,
.funds-ranking-table td {
    text-align: left;
}

.ranking-table .ranking-score > div > div {
    justify-content: flex-start;
}

.companies-ranking-table .ranking-completeness,
.funds-ranking-table .ranking-completeness {
    --score-column-width: 3.5rem;
}

.funds-ranking-table th.ranking-gqs .link,
.companies-ranking-table th.ranking-completeness .link,
.funds-ranking-table th.ranking-completeness .link {
    white-space: nowrap;
}
