body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    color: #1e1b4b;
    font-family: "DM Sans", system-ui, sans-serif;
}

h1, h2, h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
}

a {
    color: #7c3aed;
}

.site-header {
    background: rgb(255 255 255 / 0.92);
    border-bottom: 1px solid rgb(30 27 75 / 0.06);
}

.wrap {
    width: min(72rem, calc(100% - 2rem));
    margin: 0 auto;
}

.header-row, .nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-row {
    padding: 1rem 0;
}

.brand {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: #7c3aed;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
}

.nav a {
    color: rgb(30 27 75 / 0.7);
    text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: #7c3aed;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.langs {
    display: flex;
    gap: 0.45rem;
}

.langs a {
    color: rgb(30 27 75 / 0.55);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.langs a[aria-current="true"] {
    color: #7c3aed;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 0.7rem 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.btn-primary {
    background: #7c3aed;
    color: #fff;
}

.btn-primary:hover {
    background: #6d28d9;
}

.btn-quiet {
    background: transparent;
    color: rgb(30 27 75 / 0.8);
}

main {
    flex: 1;
    padding: 3rem 0 4rem;
}

.page-title {
    font-size: 2.4rem;
    margin: 0 0 0.4rem;
}

.lede {
    margin: 0 0 1.5rem;
    color: rgb(30 27 75 / 0.7);
}

.cards {
    display: grid;
    gap: 1rem;
    padding: 0;
    list-style: none;
}

.card {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
    overflow: hidden;
}

.card img, .thumb-fallback {
    width: 9rem;
    height: 7rem;
    object-fit: cover;
    background: #ede9fe;
}

.card-body {
    padding: 1rem 1rem 1rem 0;
}

.card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
}

.card h2 a {
    color: inherit;
    text-decoration: none;
}

.card h2 a:hover {
    color: #7c3aed;
}

.meta {
    margin: 0.15rem 0;
    color: rgb(30 27 75 / 0.7);
}

.pill {
    display: inline-block;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: #ede9fe;
    color: #6d28d9;
}

.hero {
    width: 100%;
    max-height: 24rem;
    object-fit: cover;
    border-radius: 1rem;
    background: #ede9fe;
}

.thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1.5rem;
}

.thumbs img {
    width: 5.5rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.5rem;
}

.panel {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
    padding: 1.25rem 1.4rem;
}

dl {
    display: grid;
    grid-template-columns: 12rem 1fr;
    gap: 0.45rem 1rem;
    margin: 0;
}

dt {
    color: rgb(30 27 75 / 0.6);
}

.tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
}

.tags li {
    background: #ede9fe;
    color: #6d28d9;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.note {
    color: rgb(30 27 75 / 0.65);
}

.login-card {
    max-width: 26rem;
    margin: 1rem auto;
}

label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}

input {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgb(30 27 75 / 0.15);
    border-radius: 0.5rem;
    font: inherit;
    box-sizing: border-box;
}

textarea {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgb(30 27 75 / 0.15);
    border-radius: 0.5rem;
    font: inherit;
    box-sizing: border-box;
}

select {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgb(30 27 75 / 0.15);
    border-radius: 0.5rem;
    font: inherit;
}
    display: inline-block;
    width: auto;
    margin-right: 0.4rem;
}

.site-footer {
    background: #1e1b4b;
    color: #fafafa;
    padding: 2.5rem 0;
}

.site-footer p {
    margin: 0.3rem 0;
}

.tagline {
    max-width: 28rem;
    color: rgb(250 250 250 / 0.75);
}

.app-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.app-main {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 16rem;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #1e1b4b, #312e81);
    color: #fff;
}

.sidebar-brand a {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 1.25rem 1rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.sidebar-brand img {
    height: 2.25rem;
    width: auto;
}

.sidebar-brand strong {
    display: block;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.15rem;
}

.sidebar-brand small {
    color: rgb(255 255 255 / 0.5);
}

.sidebar p {
    margin: 1.25rem 0 0.35rem;
    padding: 0 0.9rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.4);
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0 0.4rem;
}

.sidebar a,
.sidebar button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: rgb(255 255 255 / 0.65);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
}

.sidebar a.active,
.sidebar a:hover,
.sidebar button:hover {
    background: rgb(255 255 255 / 0.12);
    color: #fff;
    border-left-color: #a78bfa;
}

.hub {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.hub a {
    display: block;
    background: #fff;
    border: 1px solid rgb(30 27 75 / 0.08);
    border-radius: 1rem;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
}

.hub a:hover {
    border-color: rgb(124 58 237 / 0.4);
}

.hub h2 {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
}

.hub p {
    margin: 0;
    color: rgb(30 27 75 / 0.7);
    font-size: 0.9rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.filter-bar label {
    margin: 0;
    min-width: 12rem;
    flex: 1;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(30 27 75 / 0.6);
}

.filter-bar .btn {
    flex: 0 0 auto;
}

select {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgb(30 27 75 / 0.15);
    border-radius: 0.5rem;
    font: inherit;
    background: #fff;
    box-sizing: border-box;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    text-align: left;
    padding: 0 1rem 0.55rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(30 27 75 / 0.6);
}

.data-table th a {
    color: inherit;
    text-decoration: none;
}

.data-table th a:hover {
    color: #1e1b4b;
}

.data-table td {
    padding: 0.7rem 1rem 0.7rem 0;
    vertical-align: top;
    border-top: 1px solid rgb(30 27 75 / 0.1);
}

.data-table .meta,
.mono {
    font-size: 0.75rem;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: rgb(30 27 75 / 0.55);
}

.stack {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.person {
    margin: 0;
    font-family: "DM Sans", system-ui, sans-serif;
    font-weight: 700;
}

.status-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

.status-nav a {
    text-decoration: none;
    border-radius: 999px;
    padding: 0.35rem 0.95rem;
    background: #fff;
    color: rgb(30 27 75 / 0.7);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
    font-size: 0.875rem;
    font-weight: 600;
}

.status-nav a.active {
    background: #7c3aed;
    color: #fff;
}

.facts {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0.4rem 1rem;
    margin: 0.9rem 0 0;
    font-size: 0.9rem;
}

.file-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.policy-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin: 1rem 0;
}

.policy-grid label {
    margin: 0;
}

label.check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 500;
}

label.check input {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.banner-ok {
    background: #ecfdf5;
    color: #065f46;
}

.banner-wait {
    background: #fffbeb;
    color: #92400e;
}

.review-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.review-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 18rem;
    flex: 0 1 22rem;
}

.review-actions form,
.review-actions .btn {
    width: 100%;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.file-links button {
    background: none;
    border: 0;
    padding: 0;
    color: #7c3aed;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.viewer {
    width: min(72rem, 92vw);
    height: min(90vh, 52rem);
    max-width: 92vw;
    max-height: 90vh;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 1rem;
    background: #fff;
    color: #1e1b4b;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.35);
}

.viewer::backdrop {
    background: rgb(30 27 75 / 0.55);
}

.viewer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgb(30 27 75 / 0.08);
}

.viewer-bar .person,
.viewer-bar .meta {
    margin: 0;
}

.viewer-tools {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.viewer-stage {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: calc(100% - 4.2rem);
    background: #fafafa;
}

.viewer-canvas {
    height: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.viewer-canvas img,
.viewer-canvas iframe {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border: 0;
    object-fit: contain;
    background: #fff;
}

.viewer-nav {
    height: 100%;
    width: 3rem;
    border: 0;
    background: transparent;
    color: #1e1b4b;
    font-size: 2.4rem;
    cursor: pointer;
}

.viewer-nav:hover {
    background: rgb(124 58 237 / 0.08);
}

.photo-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0;
}

.photo-grid li {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #ede9fe;
    cursor: grab;
}

.photo-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-grid .photo-index,
.photo-grid form,
.photo-grid .photo-hint {
    position: absolute;
}

.photo-grid .photo-index {
    top: 0.4rem;
    left: 0.4rem;
    background: rgb(0 0 0 / 0.6);
    color: #fff;
    border-radius: 0.35rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
}

.photo-grid form {
    top: 0.35rem;
    right: 0.35rem;
}

.photo-grid form button {
    border: 0;
    border-radius: 0.35rem;
    background: #ef4444;
    color: #fff;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
}

.photo-grid .photo-hint {
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 0.35rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(transparent, rgb(0 0 0 / 0.55));
    font-size: 0.7rem;
}

.photo-grid li.dragging {
    opacity: 0.4;
}

.photo-drop {
    border: 2px dashed rgb(30 27 75 / 0.2);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    background: #fff;
}

.photo-drop label {
    font-weight: 500;
}

.photo-drop strong,
.photo-drop span {
    display: block;
}

.photo-drop span {
    color: rgb(30 27 75 / 0.55);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.slot-forms {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    margin-bottom: 1rem;
}

.slot-forms form {
    border: 1px solid rgb(30 27 75 / 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
}

.slot-forms h3 {
    margin: 0 0 0.6rem;
    font-size: 1.05rem;
}

.slot-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.slot-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-top: 1px solid rgb(30 27 75 / 0.1);
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-head .lede {
    margin-bottom: 0.25rem;
}

.profile-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
    padding: 1.4rem;
}

.profile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.profile-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.pill-ok {
    background: #dcfce7;
    color: #166534;
}

.pill-muted {
    background: rgb(30 27 75 / 0.08);
    color: rgb(30 27 75 / 0.6);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0;
}

.stat-row dt {
    color: rgb(30 27 75 / 0.5);
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-row dd {
    margin: 0.15rem 0 0;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.8rem;
    margin-top: auto;
}

.profile-actions form {
    margin: 0;
}

.btn-text {
    border: 0;
    background: transparent;
    color: #7c3aed;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0;
}

.btn-text.danger {
    color: #b91c1c;
}

.btn-text:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.empty-panel {
    text-align: center;
}

.form-grid {
    display: grid;
    gap: 0.9rem 1rem;
    grid-template-columns: 1fr;
}

.form-grid > label,
.form-grid .span-2 {
    margin: 0;
}

.form-grid label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(30 27 75 / 0.65);
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.form-grid textarea {
    resize: vertical;
}

.form-grid .search-text {
    min-height: 12rem;
    line-height: 1.55;
}

.form-grid .hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(30 27 75 / 0.55);
}

.form-grid h2 {
    margin: 0.4rem 0 0.6rem;
    font-size: 1.25rem;
}

.location-row {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr;
    margin-bottom: 0.75rem;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.search-copy {
    white-space: pre-wrap;
}

@media (min-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .location-row {
        grid-template-columns: 8rem 1fr 6rem;
        align-items: end;
    }
}

@media (max-width: 800px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .card {
        grid-template-columns: 1fr;
    }

    .card img, .thumb-fallback {
        width: 100%;
        height: 11rem;
    }

    .card-body {
        padding: 0 1rem 1rem;
    }

    dl, .facts {
        grid-template-columns: 1fr;
    }

    .review-layout {
        flex-direction: column;
    }
}
