:root {
    --bg: #f3efe7;
    --paper: rgba(255, 250, 242, 0.82);
    --ink: #1e1b18;
    --muted: #655c52;
    --line: rgba(30, 27, 24, 0.12);
    --accent: #bf5a36;
    --accent-soft: rgba(191, 90, 54, 0.12);
    --shadow: 0 24px 80px rgba(48, 34, 22, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(215, 151, 107, 0.28), transparent 28%),
        radial-gradient(circle at 85% 20%, rgba(80, 127, 109, 0.18), transparent 24%),
        linear-gradient(180deg, #f5f1e8 0%, #efe8db 100%);
    color: var(--ink);
    font-family: "Manrope", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
        repeating-linear-gradient(
            90deg,
            rgba(30, 27, 24, 0.025) 0,
            rgba(30, 27, 24, 0.025) 1px,
            transparent 1px,
            transparent 72px
        );
    opacity: 0.55;
}

.page-shell {
    position: relative;
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.utility-bar,
.admin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(30, 27, 24, 0.08);
    border-radius: 22px;
    background: rgba(255, 250, 242, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.utility-bar {
    margin-bottom: 18px;
    position: sticky;
    top: 16px;
    z-index: 4;
}

.public-admin-entry {
    justify-content: flex-end;
    margin-bottom: 10px;
}

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

.utility-button,
.utility-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 251, 246, 0.82);
    color: var(--ink);
    text-decoration: none;
    font: inherit;
}

.site-name {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.build-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 251, 246, 0.82);
    color: var(--muted);
    font-size: 0.83rem;
}

.utility-button {
    cursor: pointer;
}

.admin-summary {
    flex-wrap: wrap;
}

.diagnostics-card {
    align-items: flex-start;
}

.warning-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.warning-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(191, 90, 54, 0.12);
    color: var(--ink);
    border: 1px solid rgba(191, 90, 54, 0.18);
    font-size: 0.84rem;
}

.admin-shell {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.admin-head h2 {
    margin: 8px 0 0;
    font-family: "Instrument Serif", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 400;
    line-height: 1;
}

.admin-head p:last-child,
.admin-note,
.form-message {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.form-message.error {
    color: #8a2c16;
}

.admin-form {
    display: grid;
    gap: 12px;
}

.admin-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.utility-bar button {
    font: inherit;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
}

.project-admin-form {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.admin-save {
    width: auto;
}

.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.project-link.secondary {
    background: rgba(255, 251, 246, 0.82);
}

.admin-inline-form {
    margin: 0;
}

.admin-inline-controls {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.admin-inline-controls label {
    display: grid;
    gap: 6px;
}

.admin-inline-controls label span {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-inline-controls input,
.admin-inline-controls textarea,
.admin-inline-controls select {
    appearance: none;
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font: inherit;
}

.admin-inline-controls textarea {
    min-height: 110px;
    resize: vertical;
}

.admin-inline-controls select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 52px 0 14px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 22px) calc(50% - 3px), calc(100% - 16px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.editable-field {
    cursor: pointer;
    outline: none;
}

.editable-field:hover {
    color: var(--accent);
}

.editable-field:focus {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 rgba(191, 90, 54, 0.22);
}

.editable-block {
    display: block;
    min-height: 4.4rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 251, 246, 0.66);
    font-size: 0.83rem;
    color: var(--ink);
    line-height: 1;
    white-space: nowrap;
}

button.tag-chip {
    cursor: pointer;
    font: inherit;
}

.editable-tag {
    padding-right: 12px;
}

.tag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
}

.editable-tag > span,
.tag-add > span {
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1;
    white-space: nowrap;
}

.tag-input-shell {
    gap: 10px;
    padding: 0 12px;
}

.tag-input-shell.is-hidden,
.tag-add.is-hidden {
    display: none;
}

.tag-input {
    width: 112px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    outline: none;
}

.tag-inline-action {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.review-queue {
    display: grid;
    gap: 14px;
}

.review-list {
    display: grid;
    gap: 10px;
    width: 100%;
}

.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.review-item {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 251, 246, 0.82);
    color: var(--muted);
}

.review-item strong {
    color: var(--ink);
}

.review-item input[type="checkbox"] {
    inline-size: 18px;
    block-size: 18px;
}

.match-manual {
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 10px 12px;
    background: rgba(255, 251, 246, 0.54);
}

.match-manual summary {
    cursor: pointer;
    color: var(--muted);
}

.match-grid {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.project-meta-panel {
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 10px 12px;
    background: rgba(255, 251, 246, 0.54);
}

.project-meta-panel summary {
    cursor: pointer;
    color: var(--muted);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    inline-size: 18px;
    block-size: 18px;
}

.history-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.history-item {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--muted);
}

.history-item strong {
    color: var(--ink);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
    gap: 28px;
    align-items: start;
    min-height: min(92svh, 760px);
    padding-top: 12px;
}

.hero-copy,
.hero-panel,
.project-row {
    backdrop-filter: blur(10px);
}

.hero-copy {
    padding: 12px 8px 12px 0;
}

.eyebrow,
.section-kicker,
.panel-label,
.mini-label,
.project-slug {
    margin: 0;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--muted);
}

.hero h1,
.catalog-head h2 {
    margin: 0;
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    line-height: 0.94;
}

.hero h1 {
    max-width: 10ch;
    font-size: clamp(3.3rem, 8vw, 6.6rem);
}

.intro {
    max-width: 42rem;
    margin: 18px 0 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.hero-meta > span,
.project-tags > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 251, 246, 0.66);
    font-size: 0.83rem;
    line-height: 1;
    white-space: nowrap;
}

.hero-panel {
    align-self: start;
    padding: 24px;
    border: 1px solid rgba(30, 27, 24, 0.08);
    border-radius: 28px;
    background: var(--paper);
    box-shadow: var(--shadow);
    transform: translateY(0);
    animation: float-in 0.8s ease-out;
}

.hero-panel-head {
    display: grid;
    gap: 14px;
}

.hero-panel h2 {
    margin: 10px 0 0;
    font-size: 1.7rem;
    line-height: 1.08;
}

.hero-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.quick-links {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.quick-link {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 251, 246, 0.78);
    color: inherit;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.quick-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 247, 239, 0.96);
    border-color: rgba(191, 90, 54, 0.24);
}

.quick-link-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

.quick-link-copy {
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.9rem;
}

.panel-link,
.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.panel-link {
    background: var(--accent);
    color: #fffaf5;
    width: fit-content;
}

.panel-link:hover,
.project-link:hover {
    transform: translateY(-2px);
}

.catalog {
    margin-top: 18px;
}

.attention-strip {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.ad-slot {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid rgba(30, 27, 24, 0.08);
    border-radius: 24px;
    background: rgba(255, 250, 242, 0.6);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.catalog-head.compact {
    margin-bottom: 0;
}

.attention-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.attention-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 251, 246, 0.78);
    color: var(--muted);
    text-decoration: none;
}

.attention-card strong {
    color: var(--ink);
}

.project-group {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.group-title {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.catalog-head {
    display: grid;
    gap: 10px;
    max-width: 44rem;
    margin-bottom: 22px;
}

.catalog-head h2 {
    font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.catalog-head p {
    margin: 0;
    line-height: 1.7;
    color: var(--muted);
}

.empty-results {
    margin-top: 8px;
    color: var(--muted);
}

.is-hidden {
    display: none !important;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-summary {
    margin-top: 10px;
    color: var(--muted);
}

.filter-search {
    min-width: min(280px, 100%);
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 251, 246, 0.66);
    color: var(--ink);
    font: inherit;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 251, 246, 0.66);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.filter-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fffaf5;
}

.project-list {
    display: grid;
    gap: 16px;
}

.project-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1.7fr) minmax(250px, 0.9fr);
    gap: 20px;
    padding: 24px;
    border: 1px solid rgba(30, 27, 24, 0.08);
    border-radius: 28px;
    background: var(--paper);
    box-shadow: var(--shadow);
    animation: rise-in 0.7s ease both;
}

body[data-view="compact"] .project-row {
    grid-template-columns: 54px minmax(0, 1.8fr) minmax(220px, 0.8fr);
    gap: 16px;
    padding: 18px;
}

body[data-view="compact"] .project-summary {
    font-size: 0.96rem;
    line-height: 1.55;
}

body[data-view="compact"] .project-tags {
    margin-top: 14px;
}

.project-row:nth-child(2) {
    animation-delay: 0.08s;
}

.project-row:nth-child(3) {
    animation-delay: 0.16s;
}

.project-row:nth-child(4) {
    animation-delay: 0.24s;
}

.project-number {
    font-size: 1.1rem;
    color: var(--muted);
    padding-top: 6px;
}

.project-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: baseline;
}

.project-title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1;
}

.project-summary,
.project-aside p {
    margin: 0;
    line-height: 1.72;
}

.project-summary {
    margin-top: 14px;
    font-size: 1.02rem;
    color: var(--muted);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.status-emphasis {
    border-color: rgba(191, 90, 54, 0.22) !important;
    background: rgba(191, 90, 54, 0.12) !important;
    color: var(--ink);
}

.project-aside {
    display: grid;
    align-content: space-between;
    gap: 16px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.project-thumb {
    width: 100%;
    max-height: 220px;
    min-height: 150px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 251, 246, 0.82);
}

.thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(191, 90, 54, 0.18), transparent 48%),
        linear-gradient(180deg, rgba(255, 248, 240, 0.96), rgba(245, 236, 223, 0.9));
}

.thumb-fallback span {
    font-size: 0.88rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(30, 27, 24, 0.58);
    font-weight: 700;
}

.thumb-fallback.is-placeholder {
    background:
        radial-gradient(circle at top left, rgba(191, 90, 54, 0.14), transparent 48%),
        repeating-linear-gradient(
            135deg,
            rgba(30, 27, 24, 0.03) 0,
            rgba(30, 27, 24, 0.03) 12px,
            rgba(255, 248, 240, 0.86) 12px,
            rgba(255, 248, 240, 0.86) 24px
        );
}

.project-row.is-placeholder {
    border-style: dashed;
}

.project-aside p {
    color: var(--muted);
}

.project-link {
    width: fit-content;
    border: 1px solid var(--line);
    color: var(--ink);
    background: rgba(255, 251, 246, 0.92);
}

.project-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.project-link:hover {
    background: var(--accent-soft);
    border-color: rgba(191, 90, 54, 0.24);
}

.project-link.disabled {
    color: var(--muted);
    cursor: default;
}

.site-footer {
    display: grid;
    gap: 8px;
    margin-top: 28px;
    padding: 18px 4px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

code {
    padding: 0.1rem 0.38rem;
    border-radius: 0.42rem;
    background: rgba(30, 27, 24, 0.06);
    font-family: inherit;
    font-size: 0.92em;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .hero,
    .project-row {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 8px;
    }

    .hero h1 {
        max-width: 11ch;
        font-size: clamp(2.9rem, 14vw, 5rem);
    }

    .project-aside {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding-top: 16px;
    }

    .utility-bar,
    .admin-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 16px 14px 28px;
    }

    .hero-panel,
    .project-row {
        border-radius: 22px;
        padding: 18px;
    }

    .project-number {
        display: none;
    }
}
