:root {
    color-scheme: dark;
    --surface-app: var(--gg-background);
    --surface-workspace: var(--gg-background);
    --surface-inspector: var(--gg-details);
    --surface-panel: var(--gg-panel);
    --surface-raised: var(--gg-raised);
    --surface-field: var(--gg-field);
    --surface-hover: var(--gg-hover);
    --surface-divider: var(--gg-border);
    --surface-selected-row: var(--gg-selected-row);
    --table-surface: var(--surface-panel);
    --table-header-surface: var(--surface-inspector);
    --table-row-hover: var(--surface-hover);
    --table-row-selected: var(--surface-selected-row);
    --table-row-disabled: var(--surface-panel);
    --table-disabled-text: var(--text-tertiary);
    --table-current-marker: var(--brand-green-700);
    --table-focus: var(--control-focus-color);
    --table-divider: var(--border-default);
    --table-text: var(--text-primary);
    --table-secondary-text: var(--text-secondary);
    --surface-main: var(--gg-panel);
    --surface-sidebar: var(--gg-sidebar);
    --surface-card: var(--gg-raised);
    --surface-row: var(--gg-panel);
    --surface-card-hover: var(--gg-hover);
    --surface-input: var(--gg-field);
    --control-field-border: var(--gg-control-border);
    --surface-selected: var(--gg-selected);
    --text-on-selected: var(--gg-on-selected);
    --brand-green-300: var(--gg-primary);
    --brand-green-400: var(--gg-primary);
    --brand-green-500: var(--gg-primary);
    --brand-green-600: var(--gg-primary);
    --brand-green-700: var(--gg-selected-border);
    --brand-green-800: var(--gg-accent-heritage-green-container);
    --brand-green-900: var(--gg-accent-heritage-green-subtle-container);
    --text-primary: var(--gg-text);
    --text-secondary: var(--gg-text-secondary);
    --text-tertiary: var(--gg-text-muted);
    --text-placeholder: var(--gg-text-placeholder);
    --content-photo-accent: var(--gg-accent-rose-sepia-accent);
    --content-photo-subtle: var(--gg-accent-rose-sepia-subtle-container);
    --content-file-accent: var(--gg-accent-sepia-gold-accent);
    --content-file-subtle: var(--gg-accent-sepia-gold-subtle-container);
    --content-note-accent: var(--gg-accent-investigation-purple-accent);
    --content-note-subtle: var(--gg-accent-investigation-purple-subtle-container);
    --border-default: var(--gg-border);
    --border-strong: var(--gg-outline);
    --amber: var(--gg-accent-sepia-gold-accent);
    --red: var(--gg-status-error-accent);
    --purple: var(--gg-accent-investigation-purple-accent);
    --blue: var(--gg-accent-creative-blue-accent);
    --radius-xs: 6px;
    --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-focus-color: var(--gg-primary);
    --control-focus-width: 2px;
    --control-field-focus-color: var(--gg-primary);
    --select-chevron: var(--gg-select-chevron);
    --select-chevron-open: var(--gg-select-chevron-open);
    --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-7: 28px;
    --space-8: 32px;
    --shadow-soft: 0 12px 32px color-mix(in srgb, var(--gg-scrim) 18%, transparent);
    --ease: 170ms ease;
    --scrollbar-track: transparent;
    --scrollbar-thumb: var(--gg-scrollbar-thumb);
    --scrollbar-thumb-hover: var(--gg-scrollbar-thumb-hover);
    --scrollbar-thumb-active: var(--gg-scrollbar-thumb-hover);
    --geneograph-cover-tree-image: url("../assets/covers/geneograph-cover-tree.png");
    --on-primary: var(--gg-on-primary);
    --inverse-text: var(--gg-text);
    --text-on-media: var(--gg-on-media);
    --surface-topbar: var(--gg-topbar);
    --surface-panel-soft: var(--gg-panel);
    /* Shared solid surface for Add/Edit Person accordion sections and their fact cards. */
    --surface-person-section: color-mix(in srgb, var(--surface-card) 98%, var(--text-primary));
    --surface-sidebar-soft: var(--gg-sidebar);
    --surface-hover-tint: var(--gg-hover);
    --surface-row-divider: var(--gg-border);
    --tree-canvas-surface: var(--gg-tree-canvas);
    /* Geneograph document defaults: resolve when created, preserve explicit user paints. */
    --geneo-place-fill: var(--surface-card);
    --geneo-place-stroke: var(--border-default);
    --geneo-place-text: var(--text-primary);
    --geneo-place-icon: var(--gg-accent-map-cyan-accent);
    --tree-canvas-dot: var(--gg-tree-dots);
    --tree-connection: var(--gg-tree-line);
    --tree-connection-partner: var(--gg-tree-line);
    --tree-selected-card: var(--gg-selected);
    --tree-card-hover: var(--gg-hover);
}

:root[data-theme="light"] {
    color-scheme: light;
    --surface-person-section: transparent;
    --shadow-soft: 0 12px 32px color-mix(in srgb, var(--gg-scrim) 12%, transparent);
}

html {
    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 transparent;
    background-clip: padding-box;
    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: 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: var(--surface-topbar);
    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: color-mix(in srgb, var(--gg-text) 2.5%, transparent);
}

.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: color-mix(in srgb, var(--gg-text) 2.5%, transparent);
}

.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: var(--surface-field);
    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, var(--gg-accent-sepia-gold-container), var(--gg-accent-sepia-gold-accent));
    display: grid;
    place-items: center;
    color: var(--gg-text);
    font-size: 12px;
    font-weight: 800;
}

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

.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, color-mix(in srgb, var(--gg-primary) 62%, transparent) 17px 18px, transparent 19px),
        conic-gradient(from 170deg at 50% 92%, transparent 0 14deg, color-mix(in srgb, var(--gg-primary) 45%, transparent) 15deg 19deg, transparent 20deg 44deg, color-mix(in srgb, var(--gg-primary) 35%, transparent) 45deg 49deg, transparent 50deg 318deg, color-mix(in srgb, var(--gg-primary) 32%, transparent) 319deg 323deg, transparent 324deg),
        radial-gradient(circle at 50% 54%, color-mix(in srgb, var(--gg-primary) 35%, transparent) 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;
}

.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;
}

.project-library-nav {
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-default);
}

.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: color-mix(in srgb, var(--gg-text) 3.5%, transparent);
    color: var(--text-primary);
}

.side-link.active {
    background: var(--surface-selected);
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--gg-primary) 12%, transparent);
}

.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: color-mix(in srgb, var(--gg-accent-sepia-gold-accent) 18%, transparent);
    color: var(--amber);
}

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

.tip-card {
    border: 1px solid var(--gg-tip-border);
    background: var(--gg-tip-background);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    color: var(--gg-tip-text);
}

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

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

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

.tip-card .tip-link:hover:not(:disabled) {
    color: var(--gg-tip-text);
}

.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;
}

.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: var(--surface-card);
    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: color-mix(in srgb, var(--gg-primary) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--gg-primary) 18%, transparent);
}

.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: color-mix(in srgb, var(--gg-primary) 40%, transparent);
    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: color-mix(in srgb, var(--gg-text) 1.8%, transparent);
    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(auto-fill,
            min(100%, 325px));

    align-items: stretch;

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

.button.project-file-unavailable:disabled,
.button.project-file-unavailable:disabled:hover {
    opacity: 1;
    background: var(--gg-disabled-surface);
    color: var(--gg-disabled-text);
    border-color: var(--gg-border);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.library-create-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 280px;
    border: 1px dashed var(--gg-create-tile-outline);
    border-radius: var(--radius-sm);
    background: var(--surface-panel);
    overflow: hidden;
    transition: border-color var(--ease), background var(--ease);
}

.library-create-tile:has(.library-create-primary:hover),
.library-create-tile:focus-within {
    border-color: var(--brand-green-500);
}

.library-create-primary {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-width: 0;
    min-height: 0;
    padding: 28px 24px 12px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}

.library-create-copy {
    display: grid;
    justify-items: center;
    gap: 6px;
    max-width: 280px;
    text-align: center;
}

.library-create-primary strong {
    font-size: 16px;
    line-height: 1.4;
}

.library-create-copy > span {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
}

.library-create-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    border: 1px solid var(--brand-green-800);
    border-radius: 8px;
    background: var(--brand-green-900);
    color: var(--brand-green-300);
    transition: background var(--ease), border-color var(--ease);
}

.library-create-icon svg {
    width: 25px;
    height: 25px;
}

.library-create-primary:hover .library-create-icon {
    background: var(--brand-green-800);
    border-color: var(--brand-green-700);
}

.library-create-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    padding: 8px 24px 24px;
}

.library-import-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--surface-card);
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.library-import-action svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.library-import-action:hover:not(:disabled) {
    color: var(--brand-green-300);
    background: var(--surface-card-hover);
}

.library-import-action:disabled {
    opacity: 1;
    color: var(--gg-disabled-text);
    background: var(--gg-disabled-surface);
    border-color: var(--gg-border);
    cursor: not-allowed;
}

.library-create-primary:focus-visible,
.library-import-action:focus-visible {
    outline: 2px solid var(--brand-green-300);
    outline-offset: -3px;
}

.creation-unavailable {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.5;
}

.library-create-secondary .creation-unavailable {
    flex-basis: 100%;
    max-width: 280px;
    font-size: 11px;
    text-align: center;
}

.library-drop-feedback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: var(--surface-card);
    color: var(--brand-green-300);
    text-align: center;
    pointer-events: none;
}

.library-drop-feedback svg {
    width: 28px;
    height: 28px;
}

.library-create-tile.is-dragging {
    border-color: var(--brand-green-300);
}

.library-create-tile.is-dragging .library-drop-feedback {
    display: flex;
}

.project-list .library-create-tile,
.geneo-board-list .library-create-tile {
    flex-direction: row;
    min-height: 104px;
}

.project-list .library-create-primary,
.geneo-board-list .library-create-primary {
    flex: 1;
    flex-direction: row;
    justify-content: flex-start;
    min-height: 104px;
    padding: 20px;
}

.project-list .library-create-copy,
.geneo-board-list .library-create-copy {
    justify-items: start;
    text-align: left;
}

.project-list .library-create-secondary,
.geneo-board-list .library-create-secondary {
    align-content: center;
    max-width: 300px;
    padding: 12px 16px;
}

@media (max-width: 600px) {
    .project-list .library-create-tile,
    .geneo-board-list .library-create-tile {
        flex-direction: column;
    }

    .project-list .library-create-primary,
    .geneo-board-list .library-create-primary {
        min-height: 80px;
    }

    .project-list .library-create-secondary,
    .geneo-board-list .library-create-secondary {
        max-width: none;
        padding-top: 0;
    }
}



.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-within {
    border-color: var(--border-strong);
}

.project-card-open-area {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.project-card-open-area:focus-visible {
    outline: 2px solid var(--brand-green-500);
    outline-offset: -3px;
    border-radius: var(--radius-sm);
}

.project-cover {
    border-bottom: 1px solid var(--border-default);
    background: var(--cover, linear-gradient(145deg, color-mix(in srgb, var(--gg-selected) 90%, transparent), color-mix(in srgb, var(--gg-panel) 80%, transparent)));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.project-cover-shade {
    position: absolute;
    inset: 38% 0 0;
    background: linear-gradient(transparent, color-mix(in srgb, var(--gg-topbar) 78%, transparent));
}

.project-cover-title {
    position: absolute;
    right: var(--space-3);
    bottom: var(--space-3);
    left: var(--space-3);
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--gg-text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 2px color-mix(in srgb, var(--gg-scrim) 35%, transparent);
}

.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 {
    margin: 0 0 var(--space-1);
    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: nowrap;
    gap: var(--space-2);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
    font-size: 13px;
}

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

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

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

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

.small-open {
    height: 38px;
    min-width: 76px;
    padding: 0 var(--space-3);
    border: 0;
    border-radius: 7px;
    background: var(--brand-green-500);
    color: var(--on-primary);
    font-weight: 700;
}

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

.project-more {
    position: absolute;
    z-index: 2;
    top: var(--space-2);
    right: var(--space-2);
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    padding: 0;
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--gg-topbar) 62%, transparent);
    border-radius: 8px;
    color: var(--gg-text);
    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-cover-shade,
.list-card .project-cover-title {
    display: none;
}

.list-card .project-more {
    right: auto;
    left: 56px;
}

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

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

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

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

.project-grid .project-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(74px, auto);
}

.project-grid .project-cover {
    grid-column: 1 / -1;
    aspect-ratio: 3 / 2;
}

.project-grid .project-body {
    min-width: 0;
    align-self: center;
}

.project-grid .project-meta span,
.project-grid .modified {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-grid .project-meta svg {
    flex: none;
}

.project-grid .project-body h3 {
    display: none;
}

.project-grid .project-footer {
    align-self: center;
}

.right-card,
.panel {
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

:root[data-theme="light"] .right-card,
:root[data-theme="light"] .panel {
    background: var(--surface-panel);
}

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

.project-insights-heading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.project-insights-heading svg {
    width: 20px;
    height: 20px;
    flex: none;
    color: var(--text-secondary);
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-insights-heading svg path {
    stroke-width: 1.9;
}

.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:
        color-mix(in srgb, var(--gg-text) 1.2%, transparent);
    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:
        color-mix(in srgb, var(--gg-primary) 42%, transparent);

    background:
        color-mix(in srgb, var(--gg-primary) 3.5%, transparent);
}

.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:
        color-mix(in srgb, var(--gg-primary) 9%, transparent);

    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--gg-scrim) 16%, transparent);
}

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

    border:
        1px solid color-mix(in srgb, var(--gg-primary) 20%, transparent);

    border-radius: 10px;

    background:
        color-mix(in srgb, var(--gg-primary) 10%, transparent);

    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:
        color-mix(in srgb, var(--gg-primary) 35%, transparent);

    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: color-mix(in srgb, var(--gg-primary) 16%, transparent);
}

.marker.purple {
    border-color: var(--purple);
    background: color-mix(in srgb, var(--gg-accent-investigation-purple-accent) 14%, transparent);
}

.marker.amber {
    border-color: var(--amber);
    background: color-mix(in srgb, var(--gg-accent-sepia-gold-accent) 14%, transparent);
}

.marker.red {
    border-color: var(--red);
    background: color-mix(in srgb, var(--gg-status-error-accent) 14%, transparent);
}

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


.sync-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--gg-primary) 18%, transparent);
    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: color-mix(in srgb, var(--gg-text) 3%, transparent);
    color: var(--text-primary);
}

/* Consistent icon badge geometry; content color is determined by the item type. */
.startup-action-icon,
.project-activity-icon {
    --activity-accent: var(--gg-accent-heritage-green-accent);
    --activity-container: var(--gg-accent-heritage-green-subtle-container);
    --activity-outline: var(--gg-accent-heritage-green-outline);
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--activity-outline) 45%, var(--gg-border));
    background: var(--activity-container);
    color: var(--activity-accent);
}

.startup-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.project-activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.startup-action-icon svg,
.project-activity-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

:is(.startup-action-icon, .project-activity-icon).photos {
    --activity-accent: var(--gg-accent-rose-sepia-accent);
    --activity-container: var(--gg-accent-rose-sepia-subtle-container);
    --activity-outline: var(--gg-accent-rose-sepia-outline);
}

:is(.startup-action-icon, .project-activity-icon).files {
    --activity-accent: var(--gg-accent-sepia-gold-accent);
    --activity-container: var(--gg-accent-sepia-gold-subtle-container);
    --activity-outline: var(--gg-accent-sepia-gold-outline);
}

:is(.startup-action-icon, .project-activity-icon).notes {
    --activity-accent: var(--gg-accent-investigation-purple-accent);
    --activity-container: var(--gg-accent-investigation-purple-subtle-container);
    --activity-outline: var(--gg-accent-investigation-purple-outline);
}

:is(.startup-action-icon, .project-activity-icon).sources {
    --activity-accent: var(--gg-accent-evidence-slate-accent);
    --activity-container: var(--gg-accent-evidence-slate-subtle-container);
    --activity-outline: var(--gg-accent-evidence-slate-outline);
}

:is(.startup-action-icon, .project-activity-icon).places {
    --activity-accent: var(--gg-accent-map-cyan-accent);
    --activity-container: var(--gg-accent-map-cyan-subtle-container);
    --activity-outline: var(--gg-accent-map-cyan-outline);
}

:is(.startup-action-icon, .project-activity-icon).boards {
    --activity-accent: var(--gg-accent-creative-blue-accent);
    --activity-container: var(--gg-accent-creative-blue-subtle-container);
    --activity-outline: var(--gg-accent-creative-blue-outline);
}

:is(.startup-action-icon, .project-activity-icon).events {
    --activity-accent: var(--gg-accent-chronicle-copper-accent);
    --activity-container: var(--gg-accent-chronicle-copper-subtle-container);
    --activity-outline: var(--gg-accent-chronicle-copper-outline);
}

.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: var(--gg-status-offline-subtle-container);
    color: var(--gg-status-offline-accent);
}

.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: color-mix(in srgb, var(--gg-text) 6%, transparent);
    border-color: color-mix(in srgb, var(--gg-text) 8%, transparent);
    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: color-mix(in srgb, var(--gg-panel) 68%, transparent);
    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: var(--gg-status-error-accent);
    border-color: color-mix(in srgb, var(--gg-status-error-accent) 28%, transparent);
    background: color-mix(in srgb, var(--gg-accent-rose-sepia-subtle-container) 38%, transparent);
}

.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: color-mix(in srgb, var(--gg-primary) 45%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gg-scrim) 12%, transparent);
}

.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 color-mix(in srgb, var(--gg-text) 2.5%, transparent);
}

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

.project-activity-row:hover,
.project-activity-row:focus-visible {
    background: color-mix(in srgb, var(--gg-text) 3.5%, transparent);
    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-insight-row .startup-action-copy span {
    padding-right: var(--space-2);
}

.project-hero {
    --text-primary: var(--gg-accent-heritage-green-on-container);
    --text-secondary: var(--gg-accent-heritage-green-on-container);
    --text-tertiary: var(--gg-accent-heritage-green-on-container);
    --border-default: color-mix(in srgb, var(--gg-border) 100%, transparent);
    --border-strong: color-mix(in srgb, var(--gg-border) 100%, transparent);
    --brand-green-300: var(--gg-primary);
    --surface-card-hover: var(--gg-hover);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
    background:
        radial-gradient(circle at 86% 24%, color-mix(in srgb, var(--gg-accent-heritage-green-container) 18%, transparent), transparent 30%),
        linear-gradient(120deg, color-mix(in srgb, var(--gg-accent-heritage-green-container) 92%, transparent), color-mix(in srgb, var(--gg-accent-heritage-green-container) 75%, var(--gg-background)) 48%, color-mix(in srgb, var(--gg-accent-heritage-green-container) 60%, var(--gg-background)));
    border: 1px solid var(--border-default);
    position: relative;
    overflow: hidden;
}

.project-hero.has-image-cover {
    --text-primary: var(--gg-text);
    --text-secondary: var(--gg-text-secondary);
    --text-tertiary: var(--gg-text-muted);
    background-image:
        linear-gradient(90deg, color-mix(in srgb, var(--gg-topbar) 96%, transparent), color-mix(in srgb, var(--gg-topbar) 82%, transparent) 55%, color-mix(in srgb, var(--gg-topbar) 38%, transparent)),
        var(--project-hero-cover);
    background-size: cover;
    background-position: center, var(--cover-position, center);
}
.project-hero.has-image-cover::after { display: none; }

.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-hero .project-title-row-open h1 {
    margin: 0;
}

.project-hero .project-title-row-open {
    margin-bottom: var(--space-3);
}

.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: color-mix(in srgb, var(--gg-text) 6%, transparent);
    border-color: color-mix(in srgb, var(--gg-text) 9%, transparent);
    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: color-mix(in srgb, var(--gg-panel) 86%, transparent);
    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: var(--gg-status-error-accent);
    border-color: color-mix(in srgb, var(--gg-status-error-accent) 34%, transparent);
    background: color-mix(in srgb, var(--gg-details) 85%, transparent);
}

.project-hero-action-button.danger:hover,
.project-hero-action-button.danger:focus-visible {
    background: color-mix(in srgb, var(--gg-status-error-accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--gg-status-error-accent) 48%, transparent);
}

.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: color-mix(in srgb, var(--gg-primary) 45%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--gg-scrim) 12%, transparent);
}

.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);
}

@media (max-width: 400px) {
    .project-wide-hero-page .project-hero {
        padding: 18px;
        margin-bottom: 16px;
    }

    .project-wide-hero-page .project-hero h1 {
        font-size: 28px;
        line-height: 1.1;
    }

    .project-wide-hero-page .project-hero-layout,
    .project-wide-hero-page .project-hero-actions {
        gap: 12px;
    }

    .project-wide-hero-page .project-hero-meta {
        gap: 6px 10px;
        margin-bottom: 10px;
    }
}

/* 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: color-mix(in srgb, var(--gg-status-neutral-outline) 42%, var(--gg-status-neutral-container));
    --app-chip-background: var(--gg-status-neutral-container);
    --app-chip-color: var(--gg-status-neutral-on-container);

    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: color-mix(in srgb, var(--gg-accent-heritage-green-outline) 42%, var(--gg-accent-heritage-green-container));
    --app-chip-background: var(--gg-accent-heritage-green-container);
    --app-chip-color: var(--gg-accent-heritage-green-on-container);
}

.app-chip--places {
    --app-chip-border: color-mix(in srgb, var(--gg-accent-map-cyan-outline) 42%, var(--gg-accent-map-cyan-container));
    --app-chip-background: var(--gg-accent-map-cyan-container);
    --app-chip-color: var(--gg-accent-map-cyan-on-container);
}

.app-chip--events {
    --app-chip-border: color-mix(in srgb, var(--gg-accent-chronicle-copper-outline) 42%, var(--gg-accent-chronicle-copper-container));
    --app-chip-background: var(--gg-accent-chronicle-copper-container);
    --app-chip-color: var(--gg-accent-chronicle-copper-on-container);
}

.app-chip--boards,
.app-chip--education {
    --app-chip-border: color-mix(in srgb, var(--gg-accent-creative-blue-outline) 42%, var(--gg-accent-creative-blue-container));
    --app-chip-background: var(--gg-accent-creative-blue-container);
    --app-chip-color: var(--gg-accent-creative-blue-on-container);
}

.app-chip--photos,
.app-chip--albums {
    --app-chip-border: color-mix(in srgb, var(--gg-accent-rose-sepia-outline) 42%, var(--gg-accent-rose-sepia-container));
    --app-chip-background: var(--gg-accent-rose-sepia-container);
    --app-chip-color: var(--gg-accent-rose-sepia-on-container);
}

.app-chip--files {
    --app-chip-border: color-mix(in srgb, var(--gg-accent-sepia-gold-outline) 42%, var(--gg-accent-sepia-gold-container));
    --app-chip-background: var(--gg-accent-sepia-gold-container);
    --app-chip-color: var(--gg-accent-sepia-gold-on-container);
}

.app-chip--sources {
    --app-chip-border: color-mix(in srgb, var(--gg-accent-evidence-slate-outline) 42%, var(--gg-accent-evidence-slate-container));
    --app-chip-background: var(--gg-accent-evidence-slate-container);
    --app-chip-color: var(--gg-accent-evidence-slate-on-container);
}

.app-chip--notes,
.app-chip--related {
    --app-chip-border: color-mix(in srgb, var(--gg-accent-investigation-purple-outline) 42%, var(--gg-accent-investigation-purple-container));
    --app-chip-background: var(--gg-accent-investigation-purple-container);
    --app-chip-color: var(--gg-accent-investigation-purple-on-container);
}

.app-chip--neutral,
.app-chip--collection,
.app-chip--collections,
.app-chip--deceased {
    --app-chip-border: color-mix(in srgb, var(--gg-status-neutral-outline) 42%, var(--gg-status-neutral-container));
    --app-chip-background: var(--gg-status-neutral-container);
    --app-chip-color: var(--gg-status-neutral-on-container);
}

.app-chip--living {
    --app-chip-border: color-mix(in srgb, var(--gg-status-success-outline) 42%, var(--gg-status-success-container));
    --app-chip-background: var(--gg-status-success-container);
    --app-chip-color: var(--gg-status-success-on-container);
}

.app-chip--unknown {
    --app-chip-border: color-mix(in srgb, var(--gg-status-neutral-outline) 42%, var(--gg-status-neutral-container));
    --app-chip-background: var(--gg-status-neutral-container);
    --app-chip-color: var(--gg-status-neutral-on-container);
}

/* Category chips keep their own opaque container on branded heroes. */
.app-chip-row--on-accent .app-chip {
    box-shadow: 0 1px 2px color-mix(in srgb, var(--gg-scrim) 18%, transparent);
}

.app-chip-row--on-accent button.app-chip:hover,
.app-chip-row--on-accent a.app-chip:hover {
    box-shadow: inset 0 0 0 1px currentColor,
        0 2px 5px color-mix(in srgb, var(--gg-scrim) 20%, transparent);
}
.overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

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

.project-activity-empty {
    min-height: 180px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 5px;
    max-width: 46ch;
    line-height: 1.45;
}

.project-activity-empty strong {
    color: var(--text-primary);
    font-size: 16px;
}

.project-activity-empty span {
    color: var(--text-secondary);
    font-size: 14px;
}

.project-insights-empty {
    min-height: 96px;
    display: flex;
    align-items: center;
    padding: var(--space-4);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

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

.project-activity-list {
    display: grid;
    background: transparent;
}

.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: color-mix(in srgb, var(--gg-text) 3.5%, transparent);
    color: var(--text-primary);
}

/* Project activity badge styles share the startup badge contract above. */

.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.project-action-menu {
    box-sizing: border-box;
    min-width: 0;
    width: min(190px, calc(100vw - 24px));
}

.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: var(--gg-status-error-accent);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: var(--space-6);
    background: color-mix(in srgb, var(--gg-scrim) 60%, transparent);
    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-default);
    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);
}

#confirmMoveProject:disabled {
    opacity: .48;
    cursor: not-allowed;
}

#confirmMoveProject:disabled:hover {
    transform: none;
    filter: none;
}

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

/* Shared mobile drawer, inspector, and modal shell. */
.mobile-menu-trigger,
.mobile-sections-trigger,
.mobile-details-trigger {
    display: none;
}

.mobile-item-details,
.archive-mobile-open-folder {
    display: none;
}

.mobile-sections-trigger[hidden],
.mobile-details-trigger[hidden] {
    display: none !important;
}

.mobile-surface-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--gg-scrim) 68%, transparent);
}

.mobile-module-drawer {
    position: fixed;
    z-index: 1001;
    inset: 0 auto 0 0;
    width: min(340px, 88vw);
    max-height: 100dvh;
    overflow-y: auto;
    padding: 16px;
    background: var(--surface-sidebar);
    border-right: 1px solid var(--border-default);
}

.mobile-drawer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    color: var(--text-primary);
    font-size: 16px;
}

.mobile-drawer-heading button,
.mobile-menu-trigger,
.mobile-sections-trigger,
.mobile-details-trigger {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
}

.mobile-menu-trigger,
.mobile-sections-trigger,
.mobile-details-trigger {
    display: none;
}

.mobile-drawer-heading button:hover,
.mobile-menu-trigger:hover,
.mobile-sections-trigger:hover,
.mobile-details-trigger:hover {
    color: var(--text-primary);
    background: var(--surface-card-hover);
}

.mobile-drawer-heading svg,
.mobile-menu-trigger svg,
.mobile-sections-trigger svg,
.mobile-details-trigger svg {
    width: 20px;
    height: 20px;
}

.mobile-module-drawer nav {
    display: grid;
    gap: 4px;
    margin-top: 12px;
}

.mobile-module-drawer nav button {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
    font: inherit;
}

.mobile-module-drawer nav button svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.mobile-module-drawer nav button[aria-current="page"] {
    border-color: var(--border-strong);
    background: var(--surface-selected);
    color: var(--brand-green-300);
}

.mobile-module-drawer nav button:not([aria-current="page"]):hover {
    background: var(--surface-card-hover);
    color: var(--text-primary);
}

#mobileDetailsClose {
    position: fixed;
    z-index: 1003;
    top: 8px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    color: var(--text-primary);
}

#mobileDetailsClose svg {
    width: 18px;
    height: 18px;
}

body.mobile-details-open .tree-inspector #collapseInspector,
body.mobile-details-open .tree-inspector #restoreInspector,
body.mobile-details-open .people-person-sidebar #collapseInspector,
body.mobile-details-open .people-person-sidebar #restoreInspector,
body.mobile-details-open .albums-detail [data-albums-detail-toggle],
body.mobile-details-open .archive-inspector [data-archive-inspector-collapse],
body.mobile-details-open .places-inspector [data-places-inspector-toggle],
body.mobile-details-open .geneo-inspector [data-geneo-inspector-toggle] {
    display: none !important;
}

@media (max-width: 900px) {
    .mobile-choice-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1004;
        background: color-mix(in srgb, var(--gg-scrim) 68%, transparent);
    }

    body .mobile-choice-sheet {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 50% !important;
        right: auto !important;
        width: min(100vw, 520px) !important;
        max-height: min(80dvh, 620px);
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow: hidden;
        transform: translateX(-50%);
        border-radius: 8px 8px 0 0;
        z-index: 1005 !important;
    }

    body .mobile-choice-sheet::before {
        display: none;
    }

    .mobile-choice-heading {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 52px;
        padding: 10px 16px;
        border-bottom: 1px solid var(--border-default);
    }

    .mobile-choice-heading button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        color: var(--text-secondary);
        background: transparent;
        border: 0;
        border-radius: var(--radius-sm);
        cursor: pointer;
    }

    .mobile-choice-heading button svg {
        width: 18px;
        height: 18px;
    }

    body .mobile-choice-sheet .mobile-choice-body,
    body .mobile-choice-sheet .relative-popover-body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .mobile-sections-trigger[aria-expanded="true"],
    .mobile-details-trigger[aria-expanded="true"] {
        color: var(--brand-green-300);
    }

    .mobile-item-details,
    .archive-mobile-open-folder {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: 36px;
        padding: 4px 8px;
        border: 0;
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--brand-green-300);
        font: inherit;
        font-size: 12px;
        white-space: nowrap;
    }

    .mobile-item-details svg {
        width: 15px;
        height: 15px;
    }

    body:not(.mobile-details-open) .places-inspector,
    body:not(.mobile-details-open) .geneo-inspector {
        display: none !important;
    }

    .mobile-menu-trigger,
    .mobile-sections-trigger,
    .mobile-details-trigger {
        display: grid;
    }

    .topbar {
        gap: 4px;
        padding-inline: 8px;
    }

    .topbar .home-tab,
    .topbar .global-search {
        display: none;
    }

    .mobile-sections-trigger[hidden],
    .mobile-details-trigger[hidden] {
        display: none;
    }

    body.mobile-sections-open .workspace .sidebar {
        display: flex !important;
        position: fixed;
        z-index: 1001;
        inset: 0 auto 0 0;
        width: min(340px, 88vw);
        max-height: 100dvh;
        overflow-y: auto;
        box-shadow: 12px 0 30px color-mix(in srgb, var(--gg-scrim) 30%, transparent);
    }

    body.mobile-sections-open .workspace.no-sidebar .sidebar {
        display: flex !important;
    }

    body.mobile-details-open .tree-inspector,
    body.mobile-details-open .people-person-sidebar,
    body.mobile-details-open .albums-detail,
    body.mobile-details-open .archive-inspector,
    body.mobile-details-open .places-inspector,
    body.mobile-details-open .geneo-inspector {
        display: block !important;
        position: fixed !important;
        z-index: 1002 !important;
        inset: 0 0 0 auto !important;
        width: min(500px, 100vw) !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        margin: 0 !important;
        padding-top: 56px !important;
        border-left: 1px solid var(--border-default);
        background: var(--surface-sidebar);
        box-shadow: -12px 0 30px color-mix(in srgb, var(--gg-scrim) 30%, transparent);
    }

    body.mobile-details-open .geneo-inspector .geneo-inspector-body,
    body.mobile-details-open .archive-inspector .archive-inspector-scroll {
        max-height: none;
        overflow: visible;
    }

    #mobileSectionsHeader {
        position: sticky;
        top: calc(-1 * var(--space-5));
        z-index: 2;
        background: var(--surface-sidebar);
    }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .mobile-details-trigger[data-mobile-detail-module="People"] {
        display: grid;
    }

    body.mobile-details-open .people-person-sidebar,
    body.mobile-details-open .albums-detail,
    body.mobile-details-open .archive-inspector {
        display: block !important;
        position: fixed !important;
        z-index: 1002 !important;
        inset: 0 0 0 auto !important;
        width: min(500px, 100vw) !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto !important;
        margin: 0 !important;
        padding-top: 56px !important;
        background: var(--surface-sidebar);
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .mobile-details-trigger[data-mobile-detail-module="Archive"] {
        display: grid;
    }
}

@media (min-width: 901px) and (max-width: 980px) {
    .mobile-details-trigger[data-mobile-detail-module="Albums"] {
        display: grid;
    }
}

@media (max-width: 400px) {
    .topbar [data-topbar-notifications] {
        display: none;
    }

    .top-actions {
        gap: 2px;
    }
}

@media (max-width: 540px) {
    body #modalBackdrop.modal-backdrop.open {
        padding: 0;
        align-items: stretch;
        justify-items: stretch;
    }

    #modalBackdrop > .modal {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 100dvh;
        min-height: 0;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
    }

    #modalBackdrop > .modal .modal-header {
        padding-top: max(var(--space-4), env(safe-area-inset-top));
    }

    #modalBackdrop > .modal .modal-footer {
        padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
    }

    #modalBackdrop > .modal:has(> form > .modal-body):has(> form > .modal-footer) {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #modalBackdrop > .modal > form:has(> .modal-body):has(> .modal-footer) {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #modalBackdrop > .modal > form > .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #modalBackdrop > .modal > form > .modal-footer {
        flex: 0 0 auto;
    }

    #modalBackdrop > .modal:has(> .modal-header + .modal-body + .modal-footer) {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #modalBackdrop > .modal > .modal-body:has(+ .modal-footer) {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #modalBackdrop > .modal > .modal-footer {
        flex: 0 0 auto;
    }
}

@media (max-width: 390px) {
    .topbar [data-topbar-help] {
        display: none;
    }
}


/* Short empty-library messages in module navigation sidebars. */
.sidebar-entity-empty,
.geneo-collection-sidebar-empty,
.places-sidebar-empty {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
}
.genealogy-date-field.has-error .common-select {
    border-color: color-mix(in srgb, var(--gg-status-error-accent) 65%, transparent);
}


.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: var(--gg-status-error-accent);
}

.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;
    cursor: pointer;
}

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

.place-combobox-group {
    padding: 9px 9px 4px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
}

.place-combobox-status {
    padding: 8px 9px;
    color: var(--text-secondary);
    font-size: 12px;
}

.place-combobox-status button {
    border: 0;
    background: transparent;
    color: var(--brand-green-500);
    cursor: pointer;
    text-decoration: underline;
}


.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);
}

.field.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: color-mix(in srgb, var(--gg-status-error-accent) 65%, transparent);
}

.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-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.genealogy-calendar[hidden] { display: none; }
.genealogy-calendar-nav { display: grid; grid-template-columns: 36px minmax(0, 1fr) 72px 36px; align-items: center; gap: 6px; margin: 4px 0 10px; }
.genealogy-calendar-nav.has-endpoint { grid-template-columns: 72px 36px minmax(0, 1fr) 72px 36px; }
.genealogy-calendar-nav :is(input, select) { min-width: 0; width: 100%; }
.genealogy-calendar-nav.field select:not(.common-select):not(.add-person-select) { padding: 0 18px 0 6px; background-position: calc(100% - 4px) center; }
.genealogy-calendar-nav.field input { padding-inline: 6px; }
.genealogy-calendar-nav [hidden] { display: none; }
.genealogy-calendar-nav .icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-input); color: var(--text-secondary); cursor: pointer; }
.genealogy-calendar-nav .icon-button:hover { color: var(--text-primary); background: var(--surface-selected); }
.genealogy-calendar-nav .icon-button svg { width: 16px; height: 16px; }
.genealogy-calendar-nav [data-grid-month="-1"] svg { transform: rotate(180deg); }
.genealogy-calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.genealogy-calendar-days > span { text-align: center; font-size: 11px; color: var(--text-secondary); }
.genealogy-calendar-days button { height: 38px; min-width: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-primary); cursor: pointer; }
.genealogy-calendar-days button:hover { background: var(--surface-selected); }
.genealogy-calendar-days button:focus-visible { outline: 2px solid var(--brand-green-500); outline-offset: -2px; }
.genealogy-calendar-nav button:focus-visible { outline: 2px solid var(--brand-green-500); outline-offset: 2px; }
@media (max-width: 600px) {
    .genealogy-date-popover { width: min(520px, calc(100vw - 8px)); }
    .genealogy-date-popover .genealogy-date-parts-row { grid-template-columns: minmax(44px, .55fr) minmax(0, 1.4fr) minmax(60px, .8fr); gap: 6px; }
    .genealogy-date-popover .genealogy-date-parts-row.has-calendar-toggle { grid-template-columns: minmax(42px, .55fr) minmax(0, 1.4fr) minmax(56px, .8fr) 40px; }
    .genealogy-calendar-nav { gap: 4px; grid-template-columns: 36px minmax(0, 1fr) 52px 36px; }
    .genealogy-calendar-nav.has-endpoint { grid-template-columns: 56px 32px minmax(0, 1fr) 48px 32px; }
    .genealogy-calendar-nav.has-endpoint .icon-button { width: 32px; }
    .genealogy-calendar-nav :is(select, input) { font-size: 12px; }
    .genealogy-date-popover .genealogy-date-actions { gap: 6px; }
    .genealogy-calendar-days button { min-height: 44px; }
}

.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.has-calendar-toggle { grid-template-columns: minmax(60px, 84px) minmax(0, 1fr) minmax(78px, 104px) 40px; }
.genealogy-date-first-date, .genealogy-date-second-date { display: grid; gap: 8px; }
.genealogy-date-first-date > strong, .genealogy-date-second-date > strong { color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.genealogy-date-first-date > strong[hidden] { display: none; }
.genealogy-calendar-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--surface-input); color: var(--text-secondary); cursor: pointer; }
.genealogy-calendar-toggle:hover, .genealogy-calendar-toggle[aria-expanded="true"] { color: var(--text-primary); border-color: var(--border-strong); background: var(--surface-selected); }
.genealogy-calendar-toggle:focus-visible { outline: 2px solid var(--brand-green-500); outline-offset: 2px; }
.genealogy-calendar-toggle svg { width: 18px; height: 18px; }

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

.genealogy-date-parts-row .genealogy-date-part-field.field input {
    padding-inline: 6px;
}

.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.field label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.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);
    position: sticky;
    bottom: 0;
    z-index: 1;
    padding-top: var(--space-2);
    background: var(--surface-card);
}
.genealogy-date-actions [data-date-clear] { margin-right: auto; padding-inline: 4px; border-color: transparent; background: transparent; color: var(--text-secondary); }
.genealogy-date-actions [data-date-clear]:hover { color: var(--text-primary); background: var(--surface-selected); }

@media (max-width: 720px) {
    .genealogy-date-inline-range.is-between {
        grid-template-columns: minmax(0, 1fr) var(--control-icon-button-size);
        grid-template-rows: auto var(--control-height) auto var(--control-height) auto var(--control-height);
    }

    .genealogy-date-inline-range.is-between>label {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .genealogy-date-inline-range.is-between .genealogy-date-type-shell {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .genealogy-date-inline-range.is-between .genealogy-date-range-cell:first-child>span {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: var(--space-2);
    }

    .genealogy-date-inline-range.is-between [data-genealogy-date-input] {
        grid-column: 1;
        grid-row: 4;
    }

    .genealogy-date-inline-range.is-between .genealogy-date-details-button {
        grid-column: 2;
        grid-row: 4;
    }

    .genealogy-date-inline-range.is-between [data-genealogy-date-to-cell]>span {
        grid-column: 1 / -1;
        grid-row: 5;
        margin-top: var(--space-2);
    }

    .genealogy-date-inline-range.is-between [data-genealogy-date-input-to] {
        grid-column: 1 / -1;
        grid-row: 6;
    }
}


@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: minmax(44px, .55fr) minmax(0, 1.4fr) minmax(60px, .8fr); }
}

.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: color-mix(in srgb, var(--gg-text) 1.8%, transparent);
    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: color-mix(in srgb, var(--gg-primary) 38%, transparent);
}

.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: color-mix(in srgb, var(--gg-text) 1.8%, transparent);
}

.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: var(--surface-card);
    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 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: color-mix(in srgb, var(--gg-text) 2%, transparent);
    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: color-mix(in srgb, var(--gg-primary) 34%, transparent);
    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 > .activity-panel,
.overview-grid > .activity-panel > .panel-body {
    display: flex;
    flex-direction: column;
}

.overview-grid > .activity-panel > .panel-body {
    flex: 1;
}

.overview-grid .project-activity-footer {
    margin-top: auto;
}

.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 {
    margin-bottom: 0;
    font-size: 13px;
}

/* Project Settings follows the shared input surface and resting border. */
.project-settings-field :is(input:not(:disabled), textarea:not(:disabled), select:not(:disabled)) {
    background-color: var(--surface-input);
    border-color: var(--control-field-border);
}

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

.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);
    transition: transform var(--ease);
}

.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-cover-preview {
    width: 100%;
    aspect-ratio: 7 / 2;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--cover, linear-gradient(145deg, color-mix(in srgb, var(--gg-selected) 90%, transparent), color-mix(in srgb, var(--gg-panel) 82%, transparent)));
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

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

.project-cover-preview.cover-positionable {
    cursor: grab;
    touch-action: none;
}
.project-cover-preview.cover-positionable.is-dragging { cursor: grabbing; }
.project-cover-preview.cover-positionable:focus-visible {
    outline: 2px solid var(--brand-green-300);
    outline-offset: 2px;
}
.project-cover-reset {
    justify-self: start;
    width: fit-content;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--brand-green-300);
    text-decoration: underline;
    cursor: pointer;
}
.project-cover-reset[hidden] { display: none; }
.project-cover-reset:focus-visible {
    outline: 2px solid var(--brand-green-300);
    outline-offset: 2px;
}

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

.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: color-mix(in srgb, var(--gg-primary) 28%, transparent);
}

.project-cover-photo-modal {
    width: min(940px, calc(100vw - 32px));
    height: min(740px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}
.project-cover-photo-modal .modal-header,
.project-cover-photo-modal .modal-footer { min-width: 0; }
.project-cover-photo-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.project-cover-photo-library { min-width: 0; min-height: 0; padding: var(--space-4); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: var(--space-2); }
.project-cover-photo-search-label { font-weight: 700; }
.project-cover-photo-toolbar { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.project-cover-photo-library .project-cover-photo-search { width: auto; flex: 1 1 auto; min-width: 0; }
.project-cover-photo-grid { min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 122px; align-content: start; gap: var(--space-2); }
.project-cover-photo-grid:has(.project-cover-photo-empty) { align-content: center; }
.project-cover-photo-item { min-width: 0; padding: 0; border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: var(--surface-card); color: var(--text-primary); text-align: left; overflow: hidden; cursor: pointer; }
.project-cover-photo-item:hover, .project-cover-photo-item[aria-pressed="true"] { border-color: var(--brand-green-400); background: var(--surface-selected); }
.project-cover-photo-item:focus-visible { outline: 2px solid var(--brand-green-300); outline-offset: -2px; }
.project-cover-photo-item .photo-thumbnail { display: block; width: 100%; height: 86px; }
.project-cover-photo-item > span:last-child { display: block; padding: 6px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.project-cover-photo-empty { grid-column: 1 / -1; margin: 0 auto; max-width: 28ch; color: var(--text-secondary); text-align: center; align-self: center; }
.project-cover-photo-upload { flex: none; }
.project-cover-photo-albums { display: flex; align-items: center; gap: var(--space-2); }
.project-cover-photo-albums[hidden], .project-cover-photo-error[hidden] { display: none; }
.project-cover-photo-error { margin: 0; color: var(--red); }
.project-cover-photo-preview-pane { min-width: 0; padding: var(--space-4); border-left: 1px solid var(--border-default); background: var(--surface-main); }
.project-cover-photo-preview-pane h3 { margin: 0 0 var(--space-3); font-size: 16px; }
.project-cover-photo-preview { background-size: cover; }
.project-cover-photo-modal [data-cover-photo-confirm]:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 700px) {
    .project-cover-photo-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .project-cover-photo-preview-pane { grid-row: 1; border-left: 0; border-bottom: 1px solid var(--border-default); padding: var(--space-3); }
    .project-cover-photo-library { grid-row: 2; padding: var(--space-3); }
    .project-cover-photo-toolbar { flex-wrap: wrap; }
    .project-cover-photo-library .project-cover-photo-search { flex-basis: 100%; }
    .project-cover-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.project-settings-kv {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 9px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--gg-text) 4.5%, transparent);
    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: color-mix(in srgb, var(--gg-text) 2.5%, transparent);
    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-actions .project-settings-unavailable,
.project-location-actions .project-settings-unavailable:hover {
    opacity: 1;
    background: var(--gg-disabled-surface);
    color: var(--gg-disabled-text);
    border-color: var(--gg-border);
    cursor: help; /* Clickable preview: opens an unavailable-feature toast. */
}

.project-settings-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}

.project-settings-coming-later {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 700;
}

.project-privacy-grid select:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.project-privacy-grid .project-settings-select-field:has(select:disabled) .project-settings-select-chevron {
    opacity: .45;
}

.project-location-note {
    border: 1px solid color-mix(in srgb, var(--gg-primary) 16%, transparent);
    background: color-mix(in srgb, var(--gg-selected) 18%, transparent);
    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-workspace);
}

.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-heading {
    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);
}

.project-settings-cover-heading h3 {
    min-height: 0;
    padding: 0;
    border: 0;
}

.project-settings-cover-heading .project-cover-reset {
    flex: none;
}

.project-cover-modal-reset {
    margin-right: auto;
}

.modal-footer:has(> .project-cover-modal-reset) {
    flex-wrap: wrap;
}

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

.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 color-mix(in srgb, var(--gg-text) 7%, transparent);
    background: color-mix(in srgb, var(--gg-text) 3.5%, transparent);
    color: var(--text-secondary);
}

.project-location-status {
    color: var(--brand-green-300);
    border-color: color-mix(in srgb, var(--gg-primary) 22%, transparent);
    background: color-mix(in srgb, var(--gg-primary) 11%, transparent);
}

.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 color-mix(in srgb, var(--gg-text) 5.5%, transparent);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    background: color-mix(in srgb, var(--gg-text) 2.5%, transparent);
}

.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 {
    position: sticky;
    bottom: var(--space-3);
    z-index: 5;
    width: max-content;
    max-width: 100%;
    min-height: 0;
    margin-left: auto;
    border: 1px solid var(--border-default);
    background: var(--surface-card);
    border-radius: var(--radius-sm);
    padding: var(--space-2);
    justify-content: flex-end;
    box-shadow: var(--shadow-soft);
}

.project-settings-page-actions[hidden] {
    display: none;
}

.project-settings-discard-modal .modal-footer {
    flex-wrap: wrap;
}

@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;
    }
}


.app-navigation-controls {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 1px;
    padding-right: 10px;
    border-right: 1px solid var(--border-default);
}

.app-navigation-controls button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-primary);
}

.app-navigation-controls button svg {
    width: 18px;
    height: 18px;
}

.app-navigation-controls button svg path {
    stroke-width: 2.5;
}

.app-navigation-controls [data-app-navigation="forward"] svg {
    transform: rotate(180deg);
}

.app-navigation-controls button:hover:not(:disabled) {
    color: var(--brand-green-300);
}

.app-navigation-controls button:disabled {
    opacity: .38;
}

.app-navigation-controls button:focus-visible {
    outline: 2px solid var(--brand-green-300);
    outline-offset: 1px;
}

@media (max-width: 900px) {
    .app-navigation-controls {
        padding-right: 6px;
    }

    .app-navigation-controls button {
        width: 44px;
        height: 44px;
    }
}


/* 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: color-mix(in srgb, var(--gg-primary) 35%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gg-scrim) 8%, transparent);
}

.topbar-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--gg-status-warning-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--gg-scrim) 96%, transparent);
}

.topbar-popover {
    position: fixed;
    z-index: 95;
    width: min(360px, calc(100vw - 24px));
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    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-row.help-center-unavailable,
.topbar-popover-row.help-center-unavailable:hover {
    background: transparent;
    border-color: transparent;
    color: var(--text-tertiary);
    cursor: default;
}

.topbar-popover-row.help-center-unavailable .topbar-popover-icon {
    color: var(--text-tertiary);
    border-color: var(--border-default);
    background: var(--surface-card);
}

.topbar-popover-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid color-mix(in srgb, var(--gg-primary) 17%, transparent);
    background: color-mix(in srgb, var(--gg-primary) 11%, transparent);
    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(--gg-status-warning-accent);
    background: var(--gg-status-warning-subtle-container);
    border-color: var(--gg-status-warning-outline);
}

.topbar-popover-icon.blue {
    color: var(--blue);
    background: color-mix(in srgb, var(--gg-accent-creative-blue-accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--gg-accent-creative-blue-accent) 24%, transparent);
}

.topbar-popover-icon.purple {
    color: var(--purple);
    background: color-mix(in srgb, var(--gg-accent-investigation-purple-accent) 13%, transparent);
    border-color: color-mix(in srgb, var(--gg-accent-investigation-purple-accent) 25%, transparent);
}

.topbar-popover-icon.red {
    color: var(--gg-status-error-accent);
    background: color-mix(in srgb, var(--gg-status-error-accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--gg-status-error-accent) 25%, transparent);
}

.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: color-mix(in srgb, var(--gg-text) 1.8%, transparent);
}

.help-popover-footer {
    justify-content: flex-end;
}

.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, var(--gg-accent-sepia-gold-container), var(--gg-accent-sepia-gold-accent));
    display: grid;
    place-items: center;
    color: var(--gg-text);
    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: 360px;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
}

.global-settings-nav {
    border-right: 1px solid var(--border-default);
    background: var(--surface-sidebar-soft);
    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: var(--surface-hover-tint);
    color: var(--text-primary);
}

.global-settings-nav-button.active {
    background: var(--surface-selected);
    color: var(--text-primary);
    border-color: color-mix(in srgb, var(--gg-primary) 16%, transparent);
}

.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: var(--surface-panel-soft);
    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 var(--surface-row-divider);
    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 > div > span {
    display: block;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
}

.global-settings-select-shell {
    width: 220px;
    max-width: 100%;
}

.global-settings-row .global-settings-value {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.global-settings-row .global-settings-unavailable:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.global-settings-row .global-settings-unavailable:disabled:hover {
    transform: none;
    filter: none;
}

@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;
    text-decoration: none;
    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);
}
