:root {
    --surface-app: #0B0F0E;
    --surface-main: #0F1413;
    --surface-sidebar: #151A1A;
    --surface-card: #1A201F;
    --surface-card-hover: #202726;
    --surface-input: #242B2A;
    --surface-selected: #163A2A;
    --brand-green-300: #62D99A;
    --brand-green-400: #36C985;
    --brand-green-500: #2FAE74;
    --brand-green-600: #238B5C;
    --brand-green-700: #1B6847;
    --brand-green-800: #163A2A;
    --brand-green-900: #0D2118;
    --text-primary: #F2F4F3;
    --text-secondary: #B8C0BD;
    --text-tertiary: #7F8A86;
    --border-default: #2D3634;
    --border-strong: #3A4743;
    --amber: #D4AA6B;
    --red: #D46B6B;
    --purple: #8D6CE8;
    --blue: #5DADEC;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --topbar-h: 52px;
    --sidebar-w: 292px;
    --right-w: 320px;
    --control-height: 42px;
    --control-icon-button-size: var(--control-height);
    --search-field-max-width: 460px;
    --inspector-width: 450px;
    --inspector-collapsed-width: 54px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --shadow-soft: 0 20px 70px rgba(0, 0, 0, .34);
    --ease: 170ms ease;
    --scrollbar-track: #0F1413;
    --scrollbar-track-soft: #151A1A;
    --scrollbar-thumb: #2D3634;
    --scrollbar-thumb-hover: #3A4743;
    --scrollbar-thumb-active: #4B5B56;
    --geneograph-cover-tree-image: url("assets/geneograph-cover-tree.png");
}

html {
    color-scheme: dark;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

* {
    box-sizing: border-box;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: 2px solid var(--scrollbar-track);
    border-radius: 999px;
    min-height: 42px;
    min-width: 42px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-thumb:active {
    background: var(--scrollbar-thumb-active);
}

*::-webkit-scrollbar-corner {
    background: var(--surface-app);
}

*::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}





html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--surface-app);
    color: var(--text-primary);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
    overflow: hidden;
}


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

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--brand-green-300);
    outline-offset: 2px;
}

.app {
    height: 100%;
    display: grid;
    grid-template-rows: var(--topbar-h) 1fr;
    background:
        radial-gradient(circle at 76% 8%, rgba(47, 174, 116, .09), transparent 26%),
        var(--surface-app);
}

.topbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: 0 var(--space-4);
    border-bottom: 1px solid var(--border-default);
    background: rgba(12, 17, 16, .96);
    backdrop-filter: blur(16px);
    z-index: 20;
    min-width: 0;
}

.home-tab {
    width: 48px;
    align-self: stretch;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    position: relative;
    transition: background var(--ease), color var(--ease);
}

.home-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .025);
}

.home-tab.active::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--brand-green-500);
}

.home-tab svg,
.top-icon svg,
.global-search svg,
.button-icon {
    width: 18px;
    height: 18px;
}

.button svg {
    width: 18px;
    height: 18px;
}

.icon-rotate-up svg {
    transform: rotate(-90deg);
}

.icon-rotate-right svg {
    transform: rotate(0deg);
}

.icon-rotate-down svg {
    transform: rotate(90deg);
}

.icon-rotate-left svg {
    transform: rotate(180deg);
}

.close-button svg {
    width: 16px;
    height: 16px;
    display: block;
}

.albums-detail-collapse svg,
.archive-row-action svg,
.notes-icon-button svg {
    width: 16px;
    height: 16px;
}

.tip-card svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.app-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 190px;
    font-weight: 800;
    letter-spacing: .01em;
}



.topnav {
    display: flex;
    align-items: stretch;
    gap: 2px;
    height: 100%;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
    display: none;
}

.tab {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 0 var(--space-4);
    position: relative;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: .01em;
    transition: color var(--ease), background var(--ease);
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, .025);
}

.tab.active {
    color: var(--text-primary);
}

.tab.active::after {
    content: "";
    position: absolute;
    left: var(--space-4);
    right: var(--space-4);
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--brand-green-500);
}

.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-left: auto;
    min-width: 0;
}

.global-search {
    width: 250px;
    height: 34px;
    border: 1px solid var(--border-default);
    background: #121817;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3);
}

.global-search .shortcut {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-tertiary);
}

.top-icon {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    display: grid;
    place-items: center;
    transition: background var(--ease), color var(--ease);
}

.top-icon:hover {
    background: var(--surface-card-hover);
    color: var(--text-primary);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
    background: linear-gradient(145deg, #c9b39a, #6a4d3b);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.workspace {
    min-height: 0;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    background: var(--surface-main);
}

.sidebar {
    border-right: 1px solid var(--border-default);
    background: var(--surface-sidebar);
    min-height: 0;
    overflow-y: auto;
    padding: var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.main {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.page-grid {
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--right-w);
    gap: var(--space-6);
    padding: var(--space-8);
    overflow: auto;
    position: relative;
}

.page-grid::before {
    content: "";
    position: fixed;
    right: 360px;
    top: 58px;
    width: 390px;
    height: 260px;
    pointer-events: none;
    opacity: .075;
    background:
        radial-gradient(circle at 50% 96%, transparent 0 16px, rgba(98, 217, 154, .62) 17px 18px, transparent 19px),
        conic-gradient(from 170deg at 50% 92%, transparent 0 14deg, rgba(98, 217, 154, .45) 15deg 19deg, transparent 20deg 44deg, rgba(98, 217, 154, .35) 45deg 49deg, transparent 50deg 318deg, rgba(98, 217, 154, .32) 319deg 323deg, transparent 324deg),
        radial-gradient(circle at 50% 54%, rgba(98, 217, 154, .35) 0 2px, transparent 3px);
    filter: blur(.1px);
}

.main-column,
.right-column {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.right-column {
    display: grid;
    align-content: start;
    gap: var(--space-5);
}

.startup-page::before {
    content: "";
    position: fixed;
    top: 650px;
    right: 320px;
    width: min(42vw, 750px);
    height: 420px;
    pointer-events: none;
    opacity: .2;
    background: var(--geneograph-cover-tree-image) center / contain no-repeat;
    mix-blend-mode: screen;
    filter: saturate(.72) brightness(.82);
    z-index: 0;
}

.startup-page .right-column {
    padding-top: calc(var(--space-8) + 78px);
}

.logo-lockup {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-2) 0 var(--space-5);
}

.large-logo {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.large-logo .app-logo {
    width: 74px;
    height: 66px;
}

.logo-text strong {
    display: block;
    font-size: 22px;
    letter-spacing: .01em;
}

.logo-text span {
    color: var(--text-tertiary);
    font-weight: 700;
}

.button-stack {
    display: grid;
    gap: var(--space-3);
}

.button {
    min-height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: 0 var(--space-4);
    font-weight: 800;
    letter-spacing: .04em;
    transition: background var(--ease), border-color var(--ease), transform var(--ease), color var(--ease);
}

.button.primary {
    background: var(--brand-green-500);
    border-color: rgba(98, 217, 154, .35);
    color: #06110D;
}

.button.primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.button.secondary {
    background: #222927;
    color: var(--text-primary);
}

.button.secondary:hover,
.button.ghost:hover,
.toolbar-button:hover,
.project-more:hover {
    background: var(--surface-card-hover);
    border-color: var(--border-strong);
}

.button.ghost {
    background: transparent;
    color: var(--text-secondary);
}

.button.full {
    width: 100%;
    justify-content: flex-start;
    padding-left: var(--space-7, 28px);
}

.button.danger {
    color: #F2B3B3;
    border-color: rgba(212, 107, 107, .35);
    background: rgba(212, 107, 107, .08);
}

.side-section-title {
    margin: var(--space-1) 0 var(--space-2);
    color: var(--text-tertiary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
}

.side-section-title.with-add {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding-right: 2px;
}

.side-add-button {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-tertiary);
    display: inline-grid;
    place-items: center;
    font-size: 18px;
    line-height: 1;
    font-weight: 800;
    padding: 0;
    letter-spacing: 0;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.side-add-button:hover,
.side-add-button:focus-visible {
    background: var(--surface-card-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.side-nav {
    display: grid;
    gap: 4px;
}

.side-link {
    min-height: 44px;
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 0 var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-align: left;
    font-weight: 700;
    letter-spacing: .03em;
    transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.side-link svg {
    width: 19px;
    height: 19px;
    color: var(--text-tertiary);
}

.side-link:hover {
    background: rgba(255, 255, 255, .035);
    color: var(--text-primary);
}

.side-link.active {
    background: var(--surface-selected);
    color: var(--text-primary);
    border-color: rgba(98, 217, 154, .12);
}

.side-link.active svg {
    color: var(--brand-green-300);
}

.side-link .count,
.side-link .badge {
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 170, 107, .18);
    color: var(--amber);
}

.sidebar-spacer {
    flex: 1 1 auto;
    min-height: var(--space-6);
}

.tip-card {
    border: 1px solid rgba(47, 174, 116, .22);
    background: rgba(9, 44, 28, .52);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    color: var(--text-secondary);
}

.tip-card .tip-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
    font-weight: 800;
    margin-bottom: var(--space-3);
}

.tip-card p {
    margin: 0 0 var(--space-4);
}

.link {
    color: var(--brand-green-300);
    text-decoration: underline;
    text-underline-offset: 3px;
    background: none;
    border: 0;
    padding: 0;
}

.tip-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 20px;
    text-decoration: none;
    vertical-align: middle;
}

.tip-link-text {
    line-height: 20px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tip-link-icon {
    width: 14px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 14px;
    color: currentColor;
}

.tip-card .tip-link-icon svg {
    width: 14px;
    height: 14px;
    display: block;
    flex: 0 0 14px;
}

/* Canonical module page title */

.app-page-title {
    min-width:
        0;
    margin:
        0 0 1px;
    /*
    Keep enough paint area for descenders
    such as g, p, q, y and j while retaining
    ellipsis clipping.
    */
    padding-bottom:
        2px;
    overflow:
        hidden;
    color:
        var(--text-primary);
    font-size:
        30px;
    line-height:
        1.12;
    letter-spacing:
        0;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
}

.header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.title p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-7, 28px);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.app-search-field {
    width: var(--search-field-max-width);
    max-width: 100%;
    flex: 0 1 var(--search-field-max-width);
    height: 44px;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0 var(--space-3);
    color:
        var(--text-tertiary);
    transition:
        border-color var(--ease),
        background var(--ease);
}

.app-search-field:hover {
    border-color:
        var(--border-strong);
}

.app-search-field:focus-within {
    border-color:
        var(--border-strong);
}

.app-search-field>svg {
    width:
        21px;
    height:
        21px;
    flex:
        0 0 21px;
}

.app-search-field input {
    width:
        100%;
    min-width:
        0;
    padding:
        0;
    border:
        0;
    outline:
        0;
    background:
        transparent;
    color:
        var(--text-primary);
    font:
        inherit;
}

.app-search-field input::placeholder {
    color:
        var(--text-tertiary);
}

.app-search-field input::-webkit-search-cancel-button {
    cursor:
        pointer;
}

.select {
    height: 44px;
    min-width: 215px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    color: var(--text-secondary);
    padding: 0 42px 0 var(--space-4);
    appearance: none;
    background-image: var(--select-chevron);
    background-position: calc(100% - 20px) center;
    background-size: 12px 7px;
    background-repeat: no-repeat;
}

.toolbar-button {
    width: 52px;
    height: 44px;
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.toolbar-button svg {
    width: 22px;
    height: 22px;
}

.toolbar-button.active {
    background: var(--surface-selected);
    border-color: rgba(98, 217, 154, .35);
    color: var(--text-primary);
}

.section-heading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-4);
    font-size: 18px;
    letter-spacing: .01em;
}

.section-heading svg {
    width: 22px;
    height: 22px;
    color: var(--brand-green-500);
}

.startup-page .header-row {
    margin-bottom: calc(var(--space-6) + 26px);
}

.startup-page .toolbar {
    margin-bottom: var(--space-4);
}

.startup-continue {
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: var(--space-4);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: rgba(26, 32, 31, .9);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
}

.startup-continue-icon {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    color: var(--brand-green-300);
    background: rgba(47, 174, 116, .14);
    border: 1px solid rgba(98, 217, 154, .18);
}

.startup-continue-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.startup-continue-copy {
    min-width: 0;
}

.startup-continue-eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--brand-green-500);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.startup-continue-copy strong {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.startup-continue-context {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.startup-continue-action {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 36px;
    padding: 0 var(--space-3);
    border: 1px solid var(--border-default);
    border-radius: 7px;
    background: var(--surface-card);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-weight: 850;
}

.startup-continue-action:hover {
    border-color: rgba(98, 217, 154, .4);
    background: var(--surface-card-hover);
}

.startup-continue-action svg {
    width: 16px;
    height: 16px;
}

.startup-projects-heading {
    margin: 0 0 var(--space-3);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
}

.startup-projects-heading h2 {
    margin: 0;
    font-size: 18px;
}

.startup-projects-count {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 750;
}

.startup-project-empty {
    min-height: 210px;
    margin-bottom: var(--space-6);
    padding: var(--space-7);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .018);
    display: grid;
    place-items: center;
    text-align: center;
}

.startup-project-empty-copy {
    max-width: 470px;
}

.startup-project-empty-title {
    width: fit-content;
    max-width: 100%;

    margin:
        0 auto var(--space-2);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.startup-project-empty-title-icon {
    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    display: grid;
    place-items: center;

    color:
        var(--brand-green-300);
}

.startup-project-empty-title-icon svg {
    width: 22px;
    height: 22px;

    display: block;
}

.startup-project-empty-title h3 {
    margin: 0;
}

.startup-project-empty-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto var(--space-3);
    display: grid;
    place-items: center;
    color: var(--brand-green-300);
}

.startup-project-empty-icon svg {
    width: 32px;
    height: 32px;
}

.startup-project-empty h3 {
    margin:
        0 0 var(--space-2);

    font-size: 18px;
    line-height: 1.25;
}

.startup-project-empty-title h3 {
    margin: 0;
    line-height: 1.2;
}

.startup-project-empty p {
    margin: 0;
    color: var(--text-tertiary);
    line-height: 1.55;
}

.startup-project-empty-actions {
    margin-top:
        var(--space-4);

    display: flex;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.startup-project-empty.is-library-empty .startup-project-empty-actions .button {
    min-width: 168px;

    padding-inline:
        var(--space-6);
}

.project-grid {
    display: grid;

    grid-template-columns:
        repeat(4,
            minmax(0, 1fr));

    align-items: stretch;

    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.project-list {
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-7, 28px);
}

.project-card {
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 0;
    transition: transform var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-1px);
    background: var(--surface-card-hover);
    border-color: var(--border-strong);
}

.project-card:focus-visible {
    outline: 2px solid var(--brand-green-500);
    outline-offset: 2px;
}

.project-cover {
    height: 86px;
    border-bottom: 1px solid var(--border-default);
    background: var(--cover, linear-gradient(145deg, rgba(22, 58, 42, .9), rgba(26, 32, 31, .8)));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.project-cover.tree::after {
    content: none;
}

.project-body {
    padding: var(--space-3);
}

.project-title-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    justify-content: space-between;
}

.project-body h3 {
    min-height: 38px;
    margin: 0 0 var(--space-2);
    overflow: hidden;
    display: -webkit-box;
    font-size: 15px;
    line-height: 1.28;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    color: var(--text-tertiary);
    margin-bottom: var(--space-2);
    font-size: 12px;
}

.project-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-meta svg {
    width: 14px;
    height: 14px;
}

.project-status-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.project-status-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .72;
    flex: 0 0 4px;
    transform: translateY(1px);
}

.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 0 var(--space-3) var(--space-3);
}

.modified {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.35;
}

.small-open {
    height: 34px;
    min-width: 92px;
    padding: 0 var(--space-4);
    border: 0;
    border-radius: 7px;
    background: var(--brand-green-500);
    color: #06110D;
    font-weight: 900;
    letter-spacing: .08em;
}

.small-open:hover {
    filter: brightness(1.05);
}

.project-more {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex: 0 0 34px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    color: var(--text-primary);
    display: inline-grid;
    place-items: center;
    line-height: 0;
    font-weight: 900;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.project-more svg {
    width: 18px;
    height: 18px;
    display: block;
}

.project-more:focus-visible {
    outline: 2px solid var(--brand-green-500);
    outline-offset: 2px;
}

.list-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    align-items: center;
}

.list-card .project-cover {
    height: 82px;
    border-bottom: 0;
    border-right: 1px solid var(--border-default);
}

.list-card .project-body {
    padding: var(--space-3);
}

.list-card .project-body h3 {
    min-height: 0;
}

.list-card .project-footer {
    padding: 0 var(--space-3) 0 0;
}

.project-grid .project-card {
    min-width: 0;
    min-height: 238px;

    display: flex;
    flex-direction: column;
}

.project-grid .project-cover {
    height: 92px;
    flex: 0 0 92px;
}

.project-grid .project-body {
    flex: 1;

    display: flex;
    flex-direction: column;
}

.project-grid .modified {
    margin-top: auto;
}

.right-card,
.panel {
    border: 1px solid var(--border-default);
    background: rgba(26, 32, 31, .9);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.right-card h2,
.panel h2 {
    margin: 0;
    font-size: 16px;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-default);
}

.startup-import-tile {
    min-width: 0;
    min-height: 238px;
    padding: var(--space-4);
    border:
        1px dashed var(--border-strong);
    border-radius:
        var(--radius-sm);
    background:
        rgba(255, 255, 255, 0.012);
    color:
        var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    text-align: center;
    font: inherit;
    cursor: pointer;
    transition:
        transform var(--ease),
        background var(--ease),
        border-color var(--ease),
        box-shadow var(--ease);
}

.startup-import-tile:hover {
    transform:
        translateY(-1px);

    border-color:
        rgba(98, 217, 154, 0.42);

    background:
        rgba(47, 174, 116, 0.035);
}

.startup-import-tile:focus-visible {
    outline:
        2px solid var(--brand-green-500);

    outline-offset: 2px;
}

.startup-import-tile.is-dragging {
    border-color:
        var(--brand-green-400);

    background:
        rgba(47, 174, 116, 0.09);

    box-shadow:
        inset 0 0 0 1px rgba(98, 217, 154, 0.16);
}

.startup-import-tile-icon {
    width: 42px;
    height: 42px;

    border:
        1px solid rgba(98, 217, 154, 0.2);

    border-radius: 10px;

    background:
        rgba(47, 174, 116, 0.1);

    color:
        var(--brand-green-300);

    display: grid;
    place-items: center;
}

.startup-import-tile-icon svg {
    width: 21px;
    height: 21px;
    display: block;
}

.startup-import-tile-copy {
    min-width: 0;

    display: grid;
    justify-items: center;
    gap: 4px;
}

.startup-import-tile-copy strong {
    color:
        var(--text-primary);

    font-size: 15px;
    line-height: 1.3;
}

.startup-import-tile-copy span {
    color:
        var(--text-tertiary);

    font-size: 12px;
    line-height: 1.4;
}

.startup-import-tile-action {
    min-height: 34px;

    padding:
        0 var(--space-4);

    border:
        1px solid var(--border-default);

    border-radius: 7px;

    background:
        var(--surface-card);

    color:
        var(--text-primary);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 800;
}

.startup-import-tile:hover .startup-import-tile-action {
    border-color:
        rgba(98, 217, 154, 0.35);

    background:
        var(--surface-card-hover);
}

.project-list .startup-import-tile {
    min-height: 82px;

    padding: var(--space-3);

    display: grid;
    grid-template-columns:
        44px minmax(0, 1fr) auto;

    align-items: center;
    justify-items: start;

    gap: var(--space-3);

    text-align: left;
}

.project-list .startup-import-tile-icon {
    width: 44px;
    height: 44px;
}

.project-list .startup-import-tile-copy {
    justify-items: start;
    text-align: left;
}

.project-list .startup-import-tile-action {
    margin-left: auto;
}

.marker {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--brand-green-500);
    background: rgba(47, 174, 116, .16);
}

.marker.purple {
    border-color: var(--purple);
    background: rgba(141, 108, 232, .14);
}

.marker.amber {
    border-color: var(--amber);
    background: rgba(212, 170, 107, .14);
}

.marker.red {
    border-color: var(--red);
    background: rgba(212, 107, 107, .14);
}

.activity-time {
    color: var(--text-tertiary);
    font-size: 12px;
    white-space: nowrap;
}


.sync-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(47, 174, 116, .18);
    color: var(--brand-green-300);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.sync-icon svg {
    width: 26px;
    height: 26px;
}




.startup-action-list {
    display: grid;
}

.startup-action-row {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3) var(--space-4);
    text-align: left;
    transition: background var(--ease), color var(--ease);
}

.startup-action-row:last-child {
    border-bottom: 0;
}

.startup-action-row:hover,
.startup-action-row:focus-within {
    background: rgba(255, 255, 255, .03);
    color: var(--text-primary);
}

.startup-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(98, 217, 154, .2);
    background: rgba(47, 174, 116, .11);
    color: var(--brand-green-300);
}

.startup-action-icon svg {
    width: 19px;
    height: 19px;
}

.startup-action-icon.amber {
    border-color: rgba(212, 170, 107, .28);
    background: rgba(212, 170, 107, .12);
    color: var(--amber);
}

.startup-action-icon.purple {
    border-color: rgba(141, 108, 232, .28);
    background: rgba(141, 108, 232, .12);
    color: #BCA6FF;
}

.startup-action-icon.blue {
    border-color: rgba(93, 173, 236, .28);
    background: rgba(93, 173, 236, .12);
    color: #9CCEFF;
}

.startup-action-icon.red {
    border-color: rgba(212, 107, 107, .28);
    background: rgba(212, 107, 107, .12);
    color: #F2B3B3;
}

.startup-action-copy {
    min-width: 0;
}

.startup-action-copy strong {
    display: block;
    color: var(--text-primary);
    font-weight: 900;
    line-height: 1.25;
}

.startup-action-copy span {
    display: block;
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
}

.startup-action-copy .startup-action-project {
    color: var(--text-secondary);
    font-weight: 800;
}




.project-insight-row {
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    cursor: pointer;
}

.project-insight-chevron {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    justify-self: end;
    align-self: center;
    color: var(--text-tertiary);
    transition: color var(--ease), transform var(--ease);
}

.project-insight-chevron svg {
    width: 16px;
    height: 16px;
    display: block;
}

.project-insight-row:hover .project-insight-chevron,
.project-insight-row:focus-visible .project-insight-chevron {
    color: var(--brand-green-300);
    transform: translateX(2px);
}

.offline-card-titlebar {
    min-height: 54px;
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    border-bottom: 1px solid var(--border-default);
}

.offline-card-titlebar h2 {
    border-bottom: 0;
    padding: 0;
}

.offline-icon {
    background: rgba(127, 138, 134, .14);
    color: var(--text-secondary);
}

.offline-card-learn {
    justify-self: start;
    text-align: left;
    font-size: 13px;
}

.offline-card-body {
    padding: var(--space-4);
    display: grid;
    gap: var(--space-3);
}

.offline-card-main {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: var(--space-4);
    align-items: center;
}

.offline-card-main strong {
    display: block;
    color: var(--text-primary);
}

.offline-card-main span {
    display: block;
    color: var(--text-tertiary);
    margin-top: 3px;
}

.offline-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-tertiary);
    font-size: 12px;
}

.project-overview-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 20px;
    text-decoration: none;
    vertical-align: middle;
}

.project-overview-link-text {
    line-height: 20px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.project-overview-link-icon {
    width: 14px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 14px;
    color: currentColor;
}

.project-overview-link-icon svg {
    width: 14px;
    height: 14px;
    display: block;
    flex: 0 0 14px;
}


.project-title-row-open {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    margin-bottom: var(--space-3);
}

.project-title-row-open h1 {
    margin: 0;
    min-width: 0;
    font-size: 34px;
    letter-spacing: -.02em;
    line-height: 1.08;
}

.project-title-edit {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    padding: 0;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.project-title-edit svg {
    width: 15px;
    height: 15px;
}

.project-title-edit:hover,
.project-title-edit:focus-visible {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .08);
    color: var(--text-primary);
}

.project-hero-actions {
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--space-2);
    align-content: start;
    justify-items: stretch;
}

.project-hero-action-button {
    width: 100%;
    min-height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: rgba(26, 32, 31, .68);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    text-align: left;
    font-weight: 850;
    letter-spacing: .01em;
    transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.project-hero-action-button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.project-hero-action-button:hover {
    background: var(--surface-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.project-hero-action-button.danger {
    color: #F2B3B3;
    border-color: rgba(212, 107, 107, .28);
    background: rgba(62, 30, 34, .38);
}

.project-name-popover {
    position: fixed;
    z-index: 90;
    width: min(340px, calc(100vw - 32px));
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: var(--space-4);
    display: grid;
    gap: var(--space-3);
}

.project-name-popover h3 {
    margin: 0;
    font-size: 16px;
}

.project-name-popover label {
    display: grid;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-weight: 800;
}

.project-name-popover input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0 10px;
    outline: 0;
}

.project-name-popover input:focus {
    border-color: rgba(98, 217, 154, .45);
    box-shadow: 0 0 0 1px rgba(47, 174, 116, .12);
}

.project-name-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

.project-activity-row {
    width: 100%;
    min-height: 62px;
    border: 0;
    border-bottom: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 98px;
    gap: var(--space-3);
    align-items: center;
    padding: 0;
    text-align: left;
    transition: background var(--ease), color var(--ease);
}

.project-activity-row:first-child {
    border-top: 1px solid rgba(255, 255, 255, .025);
}

.project-activity-row:last-child {
    border-bottom: 0;
}

.project-activity-row:hover,
.project-activity-row:focus-visible {
    background: rgba(255, 255, 255, .035);
    color: var(--text-primary);
}

.project-activity-copy {
    min-width: 0;
}

.project-activity-copy strong {
    display: block;
    color: var(--text-primary);
    font-weight: 850;
    line-height: 1.25;
}

.project-activity-copy span {
    display: block;
    margin-top: 2px;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.project-activity-time {
    color: var(--text-tertiary);
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.project-insight-row {
    cursor: pointer;
    grid-template-columns: 38px minmax(0, 1fr) 24px;
}



.dropzone {
    min-height: 96px;
    border: 1px dashed var(--border-strong);
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    color: var(--text-primary);
    margin-top: var(--space-6);
}

.dropzone svg {
    width: 34px;
    height: 34px;
    color: var(--brand-green-500);
}

.dropzone span {
    display: block;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.create-gedcom-field {
    grid-column: 1 / -1;
}

.create-gedcom-dropzone {
    margin-top: 0;
    min-height: 140px;
}

.project-hero {
    border-radius: var(--radius-sm);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
    background:
        radial-gradient(circle at 86% 24%, rgba(47, 174, 116, .18), transparent 30%),
        linear-gradient(120deg, rgba(15, 82, 50, .92), rgba(12, 38, 28, .75) 48%, rgba(12, 17, 16, .9));
    border: 1px solid rgba(98, 217, 154, .13);
    position: relative;
    overflow: hidden;
}

.project-hero::after {
    content: "";
    position: absolute;
    right: 120px;
    bottom: -30px;
    width: 350px;
    height: 220px;
    opacity: .09;
    background:
        radial-gradient(circle at 50% 86%, var(--brand-green-300) 0 8px, transparent 9px),
        conic-gradient(from 180deg at 50% 90%, transparent 0 20deg, var(--brand-green-300) 21deg 24deg, transparent 25deg 55deg, var(--brand-green-300) 56deg 59deg, transparent 60deg 300deg, var(--brand-green-300) 301deg 304deg, transparent 305deg);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 830px;
}

.project-hero h1 {
    margin: 0 0 var(--space-3);
    font-size: 34px;
    letter-spacing: -.02em;
}

.project-hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 188px;
    gap: var(--space-8);
    align-items: start;
}

.project-title-row-open {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

.project-title-row-open h1 {
    margin: 0 0 var(--space-3);
    min-width: 0;
}

.project-title-edit {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    display: inline-grid;
    place-items: center;
    padding: 0;
    margin-top: 2px;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.project-title-edit svg {
    width: 15px;
    height: 15px;
}

.project-title-edit:hover,
.project-title-edit:focus-visible {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .09);
    color: var(--text-primary);
}

.project-hero-actions {
    display: grid;
    gap: var(--space-2);
    align-self: stretch;
    justify-items: stretch;
}

.project-hero-action-button {
    width: 100%;
    min-height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: rgba(26, 32, 31, .86);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    text-align: left;
    font-weight: 800;
    letter-spacing: .01em;
    transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.project-hero-action-button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.project-hero-action-button:hover,
.project-hero-action-button:focus-visible {
    background: var(--surface-card-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.project-hero-action-button.danger {
    color: #F2B3B3;
    border-color: rgba(212, 107, 107, .34);
    background: rgba(45, 20, 22, .68);
}

.project-hero-action-button.danger:hover,
.project-hero-action-button.danger:focus-visible {
    background: rgba(212, 107, 107, .14);
    border-color: rgba(212, 107, 107, .48);
}

.project-name-popover {
    position: fixed;
    width: 320px;
    z-index: 95;
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    padding: var(--space-4);
    display: grid;
    gap: var(--space-3);
}

.project-name-popover h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
}

.project-name-popover label {
    display: grid;
    gap: 7px;
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 12px;
}

.project-name-popover input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-input);
    color: var(--text-primary);
    padding: 0 var(--space-3);
    outline: 0;
}

.project-name-popover input:focus {
    border-color: rgba(98, 217, 154, .45);
    box-shadow: 0 0 0 1px rgba(47, 174, 116, .12);
}

.project-name-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.project-hero-meta {
    align-items: center;
}

.project-hero-meta>span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    line-height: 22px;
}

.project-hero-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .72;
    flex: 0 0 4px;
    transform: translateY(1px);
}

.project-desc {
    max-width: 780px;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: var(--space-4);
}

/* Shared entity and count chips */
.app-chip-row {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.app-chip {
    --app-chip-border: rgba(255, 255, 255, .1);
    --app-chip-background: rgba(255, 255, 255, .055);
    --app-chip-color: var(--text-secondary);

    min-height: 30px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--app-chip-border);
    background: var(--app-chip-background);
    color: var(--app-chip-color);
    font: inherit;
    white-space: nowrap;
}

button.app-chip,
a.app-chip {
    appearance: none;
    text-decoration: none;
    cursor: pointer;

    transition:
        border-color var(--ease),
        background var(--ease),
        color var(--ease),
        filter var(--ease),
        transform var(--ease),
        box-shadow var(--ease);
}

button.app-chip:hover,
a.app-chip:hover {
    filter: brightness(1.1);

    box-shadow:
        inset 0 0 0 1px currentColor;
}

button.app-chip:active,
a.app-chip:active {
    transform: translateY(1px);
}

button.app-chip:focus-visible,
a.app-chip:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

button.app-chip:disabled,
.app-chip[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    filter: none;
    transform: none;
}

.app-chip.is-active,
.app-chip[aria-pressed="true"],
.app-chip[aria-current="true"] {
    box-shadow: inset 0 0 0 1px currentColor;
    filter: brightness(1.08);
}

.app-chip--people {
    --app-chip-border:
        rgba(47, 174, 116, .28);

    --app-chip-background:
        rgba(47, 174, 116, .18);

    --app-chip-color:
        var(--brand-green-300);

    --app-chip-on-accent-border:
        rgba(112, 226, 163, .42);

    --app-chip-on-accent-color:
        #70E2A3;
}

.app-chip--places {
    --app-chip-border:
        rgba(76, 183, 183, .32);

    --app-chip-background:
        rgba(76, 183, 183, .18);

    --app-chip-color:
        #4CB7B7;

    --app-chip-on-accent-border:
        rgba(103, 207, 207, .42);

    --app-chip-on-accent-color:
        #73D0D0;
}

.app-chip--events {
    --app-chip-border:
        rgba(93, 173, 236, .3);

    --app-chip-background:
        rgba(93, 173, 236, .17);

    --app-chip-color:
        #8BC8F5;

    --app-chip-on-accent-border:
        rgba(139, 200, 245, .42);

    --app-chip-on-accent-color:
        #A7D6F8;
}

.app-chip--photos,
.app-chip--albums {
    --app-chip-border:
        rgba(212, 107, 107, .32);

    --app-chip-background:
        rgba(212, 107, 107, .18);

    --app-chip-color:
        #E99A9A;

    --app-chip-on-accent-border:
        rgba(233, 154, 154, .42);

    --app-chip-on-accent-color:
        #F2AEAE;
}

.app-chip--files {
    --app-chip-border:
        rgba(212, 170, 107, .32);

    --app-chip-background:
        rgba(135, 94, 30, .26);

    --app-chip-color:
        #EAC27F;

    --app-chip-on-accent-border:
        rgba(234, 194, 127, .44);

    --app-chip-on-accent-color:
        #F1CE94;
}

.app-chip--notes,
.app-chip--related {
    --app-chip-border:
        rgba(141, 108, 232, .32);

    --app-chip-background:
        rgba(141, 108, 232, .18);

    --app-chip-color:
        #B9A1FF;

    --app-chip-on-accent-border:
        rgba(185, 161, 255, .44);

    --app-chip-on-accent-color:
        #CBB9FF;
}

.app-chip--neutral,
.app-chip--collection,
.app-chip--collections {
    --app-chip-border:
        rgba(255, 255, 255, .12);

    --app-chip-background:
        rgba(255, 255, 255, .06);

    --app-chip-color:
        var(--text-secondary);

    --app-chip-on-accent-border:
        rgba(255, 255, 255, .2);

    --app-chip-on-accent-color:
        #DCE4E0;
}

/* Person status chips */

.app-chip--living {
    --app-chip-border:
        rgba(98, 217, 154, .32);

    --app-chip-background:
        rgba(47, 174, 116, .17);

    --app-chip-color:
        var(--brand-green-300);
}

.app-chip--deceased {
    --app-chip-border:
        rgba(167, 177, 173, .24);

    --app-chip-background:
        rgba(167, 177, 173, .1);

    --app-chip-color:
        #B9C1BD;
}

.app-chip--unknown {
    --app-chip-border:
        rgba(212, 170, 107, .3);

    --app-chip-background:
        rgba(212, 170, 107, .15);

    --app-chip-color:
        #DFBA7D;
}

/*
    Shared treatment for chips placed on
    strong gradients and colored surfaces.
*/

.app-chip-row--on-accent .app-chip {
    background:
        rgba(7, 15, 12, .66);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .04),
        0 1px 2px rgba(0, 0, 0, .18);
}

.app-chip-row--on-accent button.app-chip:hover,
.app-chip-row--on-accent a.app-chip:hover {
    background:
        rgba(7, 15, 12, .82);

    box-shadow:
        inset 0 0 0 1px currentColor,
        0 2px 5px rgba(0, 0, 0, .2);
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

.activity-panel {
    min-height: 312px;
}

.panel-body {
    padding: var(--space-4);
}

.project-activity-list {
    display: grid;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(11, 15, 14, .26);
}

.project-activity-row {
    width: 100%;
    min-height: 64px;
    border: 0;
    border-bottom: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 108px;
    gap: var(--space-3);
    align-items: center;
    padding: 0 var(--space-3);
    text-align: left;
    transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.project-activity-row:last-child {
    border-bottom: 0;
}

.project-activity-row:hover,
.project-activity-row:focus-visible {
    background: rgba(255, 255, 255, .035);
    color: var(--text-primary);
}

.project-activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--brand-green-300);
    background: rgba(47, 174, 116, .09);
    border: 1px solid rgba(98, 217, 154, .16);
}

.project-activity-icon svg {
    width: 18px;
    height: 18px;
}

.project-activity-icon.red {
    color: #F09B9B;
    background: rgba(212, 107, 107, .10);
    border-color: rgba(212, 107, 107, .20);
}

.project-activity-icon.amber {
    color: var(--amber);
    background: rgba(212, 170, 107, .10);
    border-color: rgba(212, 170, 107, .20);
}

.project-activity-icon.purple {
    color: #BCA6FF;
    background: rgba(141, 108, 232, .10);
    border-color: rgba(141, 108, 232, .20);
}

.project-activity-icon.blue {
    color: #9CCEFF;
    background: rgba(93, 173, 236, .10);
    border-color: rgba(93, 173, 236, .20);
}

.project-activity-copy {
    min-width: 0;
}

.project-activity-copy strong {
    display: block;
    color: var(--text-primary);
    line-height: 1.25;
}

.project-activity-copy span {
    display: block;
    color: var(--text-tertiary);
    font-size: 12px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-activity-time {
    color: var(--text-tertiary);
    font-size: 12px;
    white-space: nowrap;
    text-align: right;
}





.module-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.shortcut-card {
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    color: var(--text-secondary);
    min-height: 118px;
    text-align: left;
    transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.shortcut-card:hover {
    background: var(--surface-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.shortcut-card svg {
    width: 22px;
    height: 22px;
    color: var(--brand-green-300);
    margin-bottom: var(--space-3);
}

.shortcut-card strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.menu-popover {
    position: fixed;
    min-width: 190px;
    background: var(--surface-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    padding: 6px;
    z-index: 80;
}

.menu-popover button {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 7px;
    padding: 10px;
    text-align: left;
}

.menu-popover button:hover {
    background: var(--surface-card-hover);
    color: var(--text-primary);
}

.menu-popover button.danger {
    color: #F2B3B3;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: var(--space-6);
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(8px);
}

.modal-backdrop.open {
    display: grid;
}

.modal {
    width: min(720px, 100%);
    max-height: min(86vh, 780px);
    overflow: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    box-shadow: var(--shadow-soft);
}

.modal-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
}

.modal-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.modal-header p {
    margin: 0;
    color: var(--text-secondary);
}

.modal-body {
    padding: var(--space-6);
}

.project-delete-warning {
    margin: 0;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}

.modal-footer {
    padding: var(--space-4) var(--space-6) var(--space-6);
    border-top: 1px solid var(--border-default);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

.close-button {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    border: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-secondary);
    display: inline-grid;
    place-items: center;
    line-height: 1;
    flex: 0 0 36px;
}

.close-button:hover {
    background: var(--surface-card-hover);
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    gap: var(--space-4);
}

.field label,
.field legend {
    display: block;
    color: var(--text-secondary);
    font-weight: 800;
    margin-bottom: var(--space-2);
}

.field input {
    width: 100%;
    height: var(--control-height);
    min-height: var(--control-height);
    max-height: var(--control-height);
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0 var(--space-3);
    outline: 0;
    box-sizing: border-box;
}

.field textarea {
    width: 100%;
    min-height: 104px;
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    outline: 0;
    box-sizing: border-box;
    resize: vertical;
}

.notes-collection-form .field input,
.notes-collection-form .field textarea {
    font: inherit;
    text-align: left;
    text-indent: 0;
}

.notes-collection-form .field input {
    padding-inline: var(--space-3);
    line-height: normal;
}

.notes-collection-form .field textarea {
    padding: var(--space-3);
    line-height: 1.5;
    vertical-align: top;
}

.notes-collection-form .field input::placeholder,
.notes-collection-form .field textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 1;
}

.place-combobox-field {
    position: relative;
}

.place-combobox-shell {
    position: relative;
}

.place-combobox-list {
    position: absolute;
    z-index: 180;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    padding: 4px;
    max-height: 240px;
    overflow: auto;
}

.place-address-disclosure {
    margin-top: 7px;
    color: var(--text-tertiary);
}

.place-address-toggle {
    width: fit-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--brand-green-500);
    padding: 2px 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.place-address-toggle:hover {
    color: var(--brand-green-300);
}

.place-address-toggle.is-remove {
    color: var(--red);
}

.place-address-toggle.is-remove:hover {
    color: #F2B3B3;
}

.place-address-fields label {
    display: block;
    margin-top: 8px;
    margin-bottom: var(--space-2);
}

.place-address-fields input,
.place-address-fields input::placeholder {
    font-size: inherit;
}

.place-combobox-option {
    width: 100%;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    display: block;
    padding: 7px 9px;
    text-align: left;
}

.place-combobox-option:hover,
.place-combobox-option.active {
    background: var(--surface-selected);
    color: var(--text-primary);
}


.place-combobox-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.place-combobox-copy strong,
.place-combobox-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.place-combobox-copy span {
    color: var(--text-tertiary);
    font-size: 12px;
}

.place-combobox-hint {
    margin-top: 6px;
    color: var(--text-tertiary);
    font-size: 12px;
}

.genealogy-date-field {
    --genealogy-date-type-column:
        minmax(150px, 190px);

    --genealogy-date-input-column:
        minmax(0, 1fr);

    --genealogy-date-column-gap:
        var(--space-3);

    --genealogy-date-row-gap:
        var(--space-2);

    --genealogy-date-columns:
        var(--genealogy-date-type-column) var(--genealogy-date-input-column) var(--control-icon-button-size);

    min-width: 0;
    display: grid;
    row-gap: var(--genealogy-date-row-gap);
}

.genealogy-date-field>label {
    margin-bottom: 0;
}

.genealogy-date-field.is-exact-only {
    --genealogy-date-columns:
        minmax(0, 1fr) var(--control-icon-button-size);
}

.genealogy-date-field.is-exact-only .genealogy-date-type-shell {
    display: none;
}

.genealogy-date-controls {
    min-width: 0;
    display: grid;
    grid-template-columns:
        var(--genealogy-date-columns);
    column-gap:
        var(--genealogy-date-column-gap);
    row-gap:
        var(--genealogy-date-row-gap);
    align-items: stretch;
}

.genealogy-date-type,
.genealogy-date-input {
    min-width: 0;
    height: var(--control-height);
    min-height: var(--control-height);
    max-height: var(--control-height);
    box-sizing: border-box;
}

.genealogy-date-details-button {
    width: var(--control-icon-button-size);
    min-width: var(--control-icon-button-size);
    max-width: var(--control-icon-button-size);
    height: var(--control-height);
    min-height: var(--control-height);
    max-height: var(--control-height);
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    box-sizing: border-box;
}

.genealogy-date-details-button:hover,
.genealogy-date-details-button[aria-expanded="true"] {
    background: var(--surface-card-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.genealogy-date-details-button svg {
    width: 18px;
    height: 18px;
    display: block;
}

.genealogy-date-standard-status,
.genealogy-date-validation {
    min-height: 0;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
    display: none;
}

.genealogy-date-standard-status:not(:empty) {
    display: block;
}

.genealogy-date-validation {
    color: var(--red);
}

.genealogy-date-field.has-error .genealogy-date-input,
.genealogy-date-field.has-error .genealogy-date-type {
    border-color: rgba(255, 111, 111, .65);
}

.genealogy-date-field.has-error .genealogy-date-validation {
    display: block;
}

.genealogy-date-popover {
    position: fixed;
    z-index: 260;
    left: 50%;
    top: 50%;
    width: min(520px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 32px));
    overflow: auto;
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: var(--space-4);
    transform: translate(-50%, -50%);
}

.genealogy-date-popover-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.genealogy-date-popover-header strong {
    display: block;
    margin-bottom: 2px;
}

.genealogy-date-popover-header span,
.genealogy-date-editor-note {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.4;
}

.genealogy-date-editor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.genealogy-date-editor-grid .full {
    grid-column: 1 / -1;
}

.genealogy-date-parts-row {
    display: grid;
    grid-template-columns: minmax(72px, 88px) minmax(130px, 1fr) minmax(92px, 110px);
    gap: var(--space-3);
    align-items: end;
    min-width: 0;
}

.genealogy-date-parts-row .genealogy-date-part-field {
    min-width: 0;
}

.genealogy-date-parts-row select,
.genealogy-date-parts-row input {
    width: 100%;
}

.genealogy-date-part-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.genealogy-date-part-field label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.genealogy-date-part-field input,
.genealogy-date-part-field select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 9px 10px;
    outline: 0;
}

.genealogy-date-second-date[hidden],
.genealogy-date-part-field[hidden] {
    display: none !important;
}

.genealogy-date-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

@media (max-width: 720px) {
    .genealogy-date-controls {
        grid-template-columns: 1fr;
    }

    .genealogy-date-field.is-exact-only .genealogy-date-controls {
        grid-template-columns:
            minmax(0, 1fr) var(--control-icon-button-size);
    }

    .genealogy-date-field:not(.is-between) .genealogy-date-type-shell {
        grid-column: 1 / -1;
    }

    .genealogy-date-editor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .genealogy-date-parts-row {
        grid-template-columns: 1fr;
    }
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.choice {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .018);
    padding: var(--space-4);
    cursor: pointer;
}

.choice:hover {
    background: var(--surface-card-hover);
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice:has(input:checked) {
    background: var(--surface-selected);
    border-color: rgba(98, 217, 154, .38);
}

.choice strong {
    display: block;
    margin-bottom: 4px;
}

.choice span {
    color: var(--text-tertiary);
    font-size: 12px;
}

.choice.is-unavailable {
    cursor: not-allowed;
    opacity: .62;
}

.choice.is-unavailable:hover {
    background: rgba(255, 255, 255, .018);
}

.choice-status {
    display: inline-flex !important;
    width: fit-content;
    margin-top: 8px;
    padding: 2px 7px;
    border: 1px solid var(--border-default);
    border-radius: 999px;
    color: var(--text-secondary) !important;
    font-size: 11px !important;
    line-height: 1.4;
}

.toast {
    position: fixed;
    right: var(--space-6);
    bottom: var(--space-6);
    z-index: 200;
    max-width:
        min(560px,
            calc(100vw - 32px));
    min-height: 44px;
    padding:
        var(--space-3) var(--space-4);
    border:
        1px solid var(--border-strong);
    border-radius:
        var(--radius-sm);
    background:
        var(--surface-card);
    color:
        var(--text-secondary);
    box-shadow:
        var(--shadow-soft);
    opacity: 0;
    transform:
        translateY(12px);
    pointer-events: none;
    transition:
        opacity var(--ease),
        transform var(--ease);
    display: flex;
    align-items: center;
    gap:
        var(--space-4);
}

.toast.show {
    opacity:
        1;
    transform:
        translateY(0);
    pointer-events:
        auto;
}

.toast-message {
    min-width:
        0;
    flex:
        1 1 auto;
    line-height:
        1.45;
}

.toast-actions {
    flex:
        0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.toast-action {
    min-height: 30px;
    padding: 0 9px;
    border:
        1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color:
        var(--brand-green-300);
    font: inherit;

    font-size:
        12px;

    font-weight:
        850;

    white-space:
        nowrap;
}

.toast-action:hover {
    border-color:
        var(--border-default);

    background:
        var(--surface-card-hover);
}

@media (max-width: 620px) {
    .toast {
        right:
            var(--space-4);

        bottom:
            var(--space-4);

        left:
            var(--space-4);

        align-items:
            flex-start;

        flex-direction:
            column;

        gap:
            var(--space-2);
    }
}

.placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    padding: var(--space-8);
    color: var(--text-secondary);
    text-align: center;
}

.placeholder-card {
    max-width: 560px;
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    padding: var(--space-8);
}

.placeholder-card h1 {
    margin: 0 0 var(--space-2);
}

.placeholder-card p {
    margin: 0;
    color: var(--text-tertiary);
}


/* Project overview refinements */



.project-activity-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: var(--space-3);
    margin-top: var(--space-3);
}

.overview-grid {
    gap: var(--space-6);
}

.overview-grid .module-shortcuts {
    margin-top: 0;
}

.project-settings-section {
    border: 1px solid var(--border-default);
    background: rgba(26, 32, 31, .72);
    border-radius: var(--radius-sm);
    overflow: hidden;
}




.project-settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.project-settings-form .field.full {
    grid-column: 1 / -1;
}

.project-settings-form .field input,
.project-settings-form .field textarea,
.project-settings-form .field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    outline: 0;
}

.project-settings-form .field textarea {
    min-height: 92px;
    resize: vertical;
}

.project-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.project-cover-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}

.project-cover-option {
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, .02);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    color: var(--text-secondary);
    text-align: left;
    display: grid;
    gap: var(--space-2);
    transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.project-cover-option:hover,
.project-cover-option.active {
    background: var(--surface-card-hover);
    border-color: rgba(98, 217, 154, .34);
    color: var(--text-primary);
    transform: translateY(-1px);
}









@media (max-width: 980px) {

    .project-settings-form,
    .project-cover-options {
        grid-template-columns: 1fr;
    }
}


/* Projects refinement: startup activity, overview spacing, settings */
.startup-activity-row {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    cursor: pointer;
}

.startup-activity-chevron {
    justify-self: end;
    color: var(--text-tertiary);
    font-size: 22px;
    line-height: 1;
    transition: color var(--ease), transform var(--ease);
}

.startup-activity-row:hover .startup-activity-chevron,
.startup-activity-row:focus-visible .startup-activity-chevron {
    color: var(--brand-green-300);
    transform: translateX(2px);
}

.project-activity-footer {
    padding-top: var(--space-3);
    margin-top: var(--space-2);
    text-align: right;
}

.overview-grid .module-shortcuts {
    margin-top: 0;
}

.project-settings {
    display: grid;
    gap: var(--space-4);
}



.project-settings-section {
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 0;
}

.project-settings-section h3 {
    margin: 0;
    min-height: 52px;
    padding: 0 var(--space-4);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    font-size: 15px;
}

.project-settings-section-body {
    padding: var(--space-4);
    display: grid;
    gap: var(--space-4);
}

.project-settings-form {
    display: grid;
    gap: var(--space-4);
}

.project-settings-form.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-settings-field {
    display: grid;
    gap: var(--space-2);
    min-width: 0;
}

.project-settings-field label {
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 13px;
}

.project-settings-field input,
.project-settings-field textarea,
.project-settings-field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    outline: 0;
}

.project-settings-select-field {
    position: relative;
}

.project-settings-select-field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
}

.project-settings-select-chevron {
    position: absolute;
    right: 14px;
    bottom: 11px;
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    color: var(--text-tertiary);
    pointer-events: none;
}

.project-settings-select-chevron svg {
    width: 15px;
    height: 15px;
    display: block;
    transform: rotate(90deg);
}

.project-settings-select-field:focus-within .project-settings-select-chevron {
    color: var(--text-primary);
}

.project-settings-select-field:hover .project-settings-select-chevron {
    color: var(--text-primary);
}

.project-settings-field textarea {
    min-height: 104px;
    resize: vertical;
}

.project-settings-field input:focus,
.project-settings-field textarea:focus,
.project-settings-field select:focus {
    border-color: rgba(98, 217, 154, .45);
    box-shadow: 0 0 0 1px rgba(47, 174, 116, .12);
}

.project-cover-preview {
    height: 152px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--cover, linear-gradient(145deg, rgba(22, 58, 42, .9), rgba(26, 32, 31, .82)));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.project-cover-preview.tree::after {
    content: none;
}

.project-cover-modal-body {
    display: grid;
    gap: var(--space-4);
}

.project-cover-modal-preview {
    width: 100%;
    height: 184px;
}

@media (max-width: 600px) {
    .project-cover-modal-preview {
        height: 140px;
    }
}

.project-cover-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}

.project-cover-option {
    min-height: 40px;
    border: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 0 var(--space-3);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2);
    font-weight: 800;
    text-align: left;
}

.project-cover-option:hover,
.project-cover-option.active {
    background: var(--surface-selected);
    color: var(--brand-green-300);
    border-color: rgba(98, 217, 154, .28);
}

.project-settings-kv {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .045);
    color: var(--text-secondary);
}

.project-settings-kv:last-child {
    border-bottom: 0;
}

.project-settings-kv span:first-child {
    color: var(--text-tertiary);
}

.project-location-path {
    min-height: 44px;
    border: 1px solid var(--border-default);
    background: rgba(255, 255, 255, .025);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.project-location-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    justify-content: stretch;
}

.project-location-actions .button {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    text-align: left;
    letter-spacing: .01em;
    padding: 0 var(--space-3);
}

.project-location-note {
    border: 1px solid rgba(98, 217, 154, .16);
    background: rgba(22, 58, 42, .18);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    line-height: 1.5;
}

.project-settings-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.project-settings-actions.project-location-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
}


@media (max-width: 1180px) {
    .project-settings-form.two-col {
        grid-template-columns: 1fr;
    }
}


/* Project settings refined layout */
.project-settings-view {
    height: 100%;
    min-width: 0;
    overflow: auto;
    padding: var(--space-6);
    background: var(--surface-main);
}

.project-settings-page {
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    gap: var(--space-5);
    padding-bottom: var(--space-8);
}

.project-settings-section-one {
    display: grid;
    grid-template-columns: minmax(420px, 1.25fr) minmax(340px, .75fr);
    gap: var(--space-5);
    align-items: stretch;
    width: 100%;
}

.project-settings-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-settings-card .project-settings-section-body {
    flex: 1 1 auto;
}

.project-settings-identity-body {
    min-height: 306px;
    display: grid;
}

.project-settings-identity-form {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(190px, 1fr);
    gap: var(--space-4);
}

.project-settings-description-field {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.project-settings-description-field textarea {
    height: 100%;
    min-height: 190px;
    resize: vertical;
}

.project-settings-cover-card .project-settings-section-body {
    align-content: start;
}

.project-settings-cover-card .project-cover-preview {
    height: 184px;
}

.project-settings-full-card,
.project-settings-page-actions {
    width: 100%;
}

.project-location-body {
    grid-template-columns: minmax(0, 1fr);
}

.project-location-summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.project-location-status,
.project-location-muted {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .035);
    color: var(--text-secondary);
}

.project-location-status {
    color: var(--brand-green-300);
    border-color: rgba(98, 217, 154, .22);
    background: rgba(47, 174, 116, .11);
}

.project-location-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.project-location-meta .project-settings-kv {
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: rgba(255, 255, 255, .025);
}

.project-location-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-2);
    justify-content: stretch;
}

.project-location-actions .button {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    text-align: left;
    letter-spacing: .01em;
    padding: 0 var(--space-3);
}

.project-privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.project-settings-page-actions {
    min-height: 64px;
    border: 1px solid var(--border-default);
    background: rgba(21, 26, 26, .88);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    justify-content: space-between;
    box-shadow: 0 -10px 32px rgba(0, 0, 0, .18);
}

@media (max-width: 1180px) {
    .project-settings-section-one {
        grid-template-columns: 1fr;
    }

    .project-location-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-location-meta {
        grid-template-columns: 1fr;
    }

    .project-privacy-grid {
        grid-template-columns: 1fr;
    }
}


/* Global top bar overlays */
.top-icon,
.avatar {
    position: relative;
    flex: 0 0 auto;
}

.avatar {
    padding: 0;
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.avatar:hover {
    transform: translateY(-1px);
    border-color: rgba(98, 217, 154, .35);
    box-shadow: 0 0 0 3px rgba(47, 174, 116, .08);
}

.topbar-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--amber);
    box-shadow: 0 0 0 2px rgba(12, 17, 16, .96);
}

.topbar-popover {
    position: fixed;
    z-index: 95;
    width: min(360px, calc(100vw - 24px));
    border: 1px solid var(--border-strong);
    background: rgba(26, 32, 31, .98);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.topbar-popover.wide {
    width: min(420px, calc(100vw - 24px));
}

.topbar-popover-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}

.topbar-popover-header h2 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.2;
}

.topbar-popover-header p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.35;
}

.topbar-popover-list {
    display: grid;
    padding: 6px;
    max-height: min(420px, 70vh);
    overflow: auto;
}

.topbar-popover-row {
    width: 100%;
    min-height: 58px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-3);
    padding: 10px;
    text-align: left;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.topbar-popover-row:hover,
.topbar-popover-row:focus-visible {
    background: var(--surface-card-hover);
    border-color: var(--border-default);
    color: var(--text-primary);
}

.topbar-popover-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(98, 217, 154, .17);
    background: rgba(47, 174, 116, .11);
    color: var(--brand-green-300);
    display: grid;
    place-items: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.topbar-topic-icon svg,
.global-settings-nav-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.topbar-popover-icon.warn {
    color: var(--amber);
    background: rgba(212, 170, 107, .12);
    border-color: rgba(212, 170, 107, .24);
}

.topbar-popover-icon.blue {
    color: var(--blue);
    background: rgba(93, 173, 236, .12);
    border-color: rgba(93, 173, 236, .24);
}

.topbar-popover-icon.purple {
    color: var(--purple);
    background: rgba(141, 108, 232, .13);
    border-color: rgba(141, 108, 232, .25);
}

.topbar-popover-icon.red {
    color: #f1a1a1;
    background: rgba(212, 107, 107, .12);
    border-color: rgba(212, 107, 107, .25);
}

.topbar-popover-copy {
    min-width: 0;
}

.topbar-popover-copy strong {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.25;
    margin-bottom: 3px;
}

.topbar-popover-copy span {
    display: block;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
}

.topbar-popover-arrow {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    color: var(--text-tertiary);
}

.topbar-popover-arrow svg {
    width: 14px;
    height: 14px;
    display: block;
}

.topbar-popover-footer {
    min-height: 52px;
    border-top: 1px solid var(--border-default);
    padding: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    background: rgba(255, 255, 255, .018);
}

.topbar-popover-footer .button,
.topbar-popover-header .button {
    min-height: 34px;
    padding: 0 12px;
    letter-spacing: .01em;
}

.profile-popover-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: linear-gradient(145deg, #c9b39a, #6a4d3b);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.profile-popover-status {
    margin-top: 4px;
    color: var(--brand-green-300);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 18px;
}

.profile-popover-status-icon {
    width: 14px;
    height: 14px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 14px;
}

.profile-popover-status-icon svg {
    width: 13px;
    height: 13px;
    display: block;
}


.global-settings-modal {
    width: min(980px, 100%);
}

.global-settings-layout {
    min-height: 560px;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.global-settings-nav {
    border-right: 1px solid var(--border-default);
    background: rgba(15, 20, 19, .6);
    padding: var(--space-4);
    display: grid;
    align-content: start;
    gap: 6px;
}

.global-settings-nav-button {
    width: 100%;
    min-height: 42px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    text-align: left;
    font-weight: 800;
    transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.global-settings-nav-button:hover {
    background: rgba(255, 255, 255, .035);
    color: var(--text-primary);
}

.global-settings-nav-button.active {
    background: var(--surface-selected);
    color: var(--text-primary);
    border-color: rgba(98, 217, 154, .16);
}

.global-settings-nav-icon {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 18px;
    color: currentColor;
    line-height: 1;
}

.global-settings-nav-label {
    min-width: 0;
    line-height: 20px;
}

.global-settings-panel {
    padding: var(--space-5);
    display: grid;
    align-content: start;
    gap: var(--space-4);
    overflow: auto;
}

.global-settings-section {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: rgba(26, 32, 31, .72);
    overflow: hidden;
}

.global-settings-section h3 {
    margin: 0;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-default);
    font-size: 15px;
}

.global-settings-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, .045);
    color: var(--text-secondary);
}

.global-settings-row:last-child {
    border-bottom: 0;
}

.global-settings-row strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.global-settings-row span {
    display: block;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
}

.global-settings-control {
    min-height: 38px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-input);
    color: var(--text-primary);
    padding: 0 var(--space-3);
    min-width: 150px;
}

.global-settings-toggle {
    width: 46px;
    height: 26px;
    border: 1px solid rgba(98, 217, 154, .28);
    border-radius: 999px;
    background: rgba(47, 174, 116, .18);
    position: relative;
    flex: 0 0 auto;
}

.global-settings-toggle::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    right: 3px;
    top: 3px;
    background: var(--brand-green-500);
}

.global-settings-toggle.off {
    border-color: var(--border-default);
    background: rgba(255, 255, 255, .05);
}

.global-settings-toggle.off::after {
    left: 3px;
    right: auto;
    background: var(--text-tertiary);
}



@media (max-width: 840px) {
    .global-settings-layout {
        grid-template-columns: 1fr;
    }

    .global-settings-nav {
        border-right: 0;
        border-bottom: 1px solid var(--border-default);
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-popover {
        right: 12px !important;
        left: auto !important;
    }
}


.topbar-text-button {
    min-height: 34px;
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-weight: 800;
    letter-spacing: .01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.topbar-text-button-icon {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 16px;
}

.topbar-text-button-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.topbar-text-button:hover {
    background: var(--surface-card-hover);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.profile-popover-head {
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-default);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: var(--space-3);
    align-items: center;
}

.profile-popover-head strong {
    display: block;
    color: var(--text-primary);
}

.profile-popover-head span {
    display: block;
    color: var(--text-tertiary);
    font-size: 12px;
    margin-top: 2px;
}

.topbar-divider {
    height: 1px;
    background: var(--border-default);
    margin: 6px 4px;
}

.global-settings-panel>h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.02em;
}

.global-settings-panel>p {
    margin: -8px 0 0;
    color: var(--text-secondary);
}

.global-settings-path {
    max-width: 330px;
    border: 1px solid var(--border-default);
    background: var(--surface-input);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
