﻿:root {
    --bg: #efe4d2;
    --panel: rgba(255, 251, 245, 0.88);
    --panel-strong: #fffaf2;
    --text: #2b1d14;
    --muted: #7c6657;
    --accent: #8e4b2b;
    --accent-dark: #63311a;
    --line: rgba(99, 49, 26, 0.12);
    --branch: rgba(99, 49, 26, 0.28);
    --shadow: 0 22px 60px rgba(67, 37, 20, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Montserrat", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(142, 75, 43, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(96, 125, 87, 0.16), transparent 22%),
        linear-gradient(135deg, #f3e7d7 0%, #e6d7c0 52%, #f8efe3 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.page-shell {
    width: min(1680px, calc(100% - 24px));
    margin: 0 auto;
    padding: 12px 0 40px;
}

.site-header,
.hero,
.form-panel,
.person-card,
.empty-state,
.message,
.branch-card,
.detail-hero,
.relation-panel,
.search-panel {
    background: var(--panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.site-header {
    position: relative;
    z-index: 50;
    overflow: visible;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 20px;
}

.site-header h1,
.hero h2,
.section-head h2,
.section-head h3,
.person-card h4,
.empty-state h4,
.branch-card h4,
.detail-copy h2,
.relation-panel h3,
.picker-card h3 {
    font-family: "Noto Serif Armenian", serif;
    margin: 0;
}

.site-header h1 {
    font-size: 1.55rem;
}

.site-header nav {
    position: relative;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    overflow: visible;
}

.eyebrow {
    margin: 0 0 5px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.6rem;
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff9f2;
    font-weight: 600;
    font-size: 0.88rem;
    transition: transform 180ms ease, background 180ms ease;
    border: none;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-1px);
    background: var(--accent-dark);
}

.button-secondary {
    background: transparent;
    color: var(--accent-dark);
    border: 1px solid rgba(99, 49, 26, 0.22);
}

.hero,
.detail-hero {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 12px;
}

.hero-compact {
    padding: 12px 14px;
}

.hero-single {
    grid-template-columns: 1fr;
}

.hero h2,
.detail-copy h2 {
    font-size: clamp(1.2rem, 2.2vw, 1.9rem);
    line-height: 1.02;
    margin-bottom: 6px;
}

.hero-copy p,
.detail-bio,
.edit-head p {
    max-width: 52ch;
    color: var(--muted);
    font-size: 0.84rem;
    margin: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.search-panel {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 18px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.search-form input[type="search"] {
    flex: 1 1 320px;
}

.search-results {
    margin-top: 12px;
}

.search-summary,
.search-empty {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

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

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(99, 49, 26, 0.14);
    background: rgba(255, 250, 243, 0.85);
}

.search-result-item small {
    color: var(--muted);
}

.search-result-item.active,
.branch-card-highlighted {
    outline: 2px solid rgba(34, 102, 196, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 102, 196, 0.18), var(--shadow);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin: 18px 0 12px;
}

.edit-head {
    margin: 0 0 18px;
}

.compact-gap {
    margin-top: 20px;
}

.branch-forest {
    width: calc(100% + 80px);
    margin-left: -40px;
    margin-right: -40px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 6px 40px 10px;
    text-align: center;
    scroll-behavior: smooth;
}

.branch-root > .branch-node,
.branch-children,
.branch-root {
    list-style: none;
    padding: 0;
}

.branch-root {
    margin: 0 auto 18px;
    display: table;
    text-align: center;
}

.branch-node {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0 8px;
}

.branch-card-shell {
    position: relative;
    z-index: 2;
}

.branch-card,
.person-card,
.relation-panel,
.picker-card,
.branch-hover-card {
    border-radius: 16px;
    overflow: hidden;
}

.branch-card {
    width: 132px;
    position: relative;
    z-index: 1;
}

.branch-hover-card {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(6px);
    width: 250px;
    padding: 12px 13px;
    text-align: left;
    background: rgba(255, 250, 243, 0.98);
    border: 1px solid rgba(99, 49, 26, 0.16);
    box-shadow: 0 24px 60px rgba(67, 37, 20, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.branch-hover-card::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 14px;
    height: 14px;
    background: rgba(255, 250, 243, 0.98);
    border-right: 1px solid rgba(99, 49, 26, 0.16);
    border-bottom: 1px solid rgba(99, 49, 26, 0.16);
    transform: translateX(-50%) rotate(45deg);
}

.branch-card-shell:hover .branch-hover-card,
.branch-card-shell:focus-within .branch-hover-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.branch-hover-card .eyebrow {
    margin-bottom: 4px;
}

.branch-hover-card h5 {
    margin: 0;
    font-family: "Noto Serif Armenian", serif;
    font-size: 0.92rem;
    line-height: 1.2;
}

.hover-meta-list {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
}

.hover-meta-list div {
    display: grid;
    gap: 1px;
}

.hover-meta-list dt,
.hover-relations span {
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.hover-meta-list dd,
.hover-relations p,
.hover-bio {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text);
}

.hover-bio {
    margin-top: 10px;
    color: var(--muted);
}

.hover-relations {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(99, 49, 26, 0.1);
}

.hover-relations div {
    display: grid;
    gap: 2px;
}

.branch-children {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin: 18px auto 0;
    position: relative;
    width: max-content;
}

.branch-children::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: var(--branch);
}

.branch-node .branch-children::after {
    content: "";
    position: absolute;
    top: -10px;
    left: calc(50% - 28px);
    right: calc(50% - 28px);
    height: 2px;
    background: var(--branch);
}

.branch-children > .branch-node::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: var(--branch);
}

.tree-card-link {
    display: block;
}

.tree-card-photo,
.person-photo,
.detail-photo,
.placeholder-detail {
    height: 88px;
    background: linear-gradient(135deg, rgba(142, 75, 43, 0.18), rgba(96, 125, 87, 0.18));
}

.tree-card-photo img,
.person-photo img,
.detail-photo,
.photo-placeholder,
.placeholder-detail {
    width: 100%;
    height: 100%;
}

.tree-card-photo img,
.person-photo img,
.detail-photo {
    object-fit: cover;
    display: block;
}

.photo-placeholder,
.placeholder-detail {
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: var(--accent-dark);
    font-family: "Noto Serif Armenian", serif;
}

.tree-card-content,
.person-content {
    padding: 8px 9px;
}

.branch-card h4 {
    font-size: 0.78rem;
    line-height: 1.18;
}

.years,
.bio,
.message,
.form-row small,
.relation-panel p,
.relation-panel a,
.detail-bio,
.large-years,
.picker-card p {
    color: var(--muted);
}

.branch-card .years {
    font-size: 0.66rem;
    margin: 6px 0 0;
    line-height: 1.22;
}

.people-grid,
.relationship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.relationship-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.compact-card .person-content {
    min-height: 180px;
}

.detail-photo-wrap {
    align-self: stretch;
}

.relationship-grid {
    margin-top: 20px;
}

.relation-panel {
    padding: 18px;
    line-height: 1.6;
}

.edit-panel {
    margin-top: 22px;
}

.form-panel {
    padding: 22px;
    border-radius: 24px;
}

.person-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.enhanced-form {
    gap: 16px;
}

.form-section-title {
    grid-column: 1 / -1;
    font-family: "Noto Serif Armenian", serif;
    font-size: 1rem;
    color: var(--accent-dark);
    margin-top: 2px;
}

.section-break {
    margin-top: 8px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.full-span,
.person-form button {
    grid-column: 1 / -1;
}

.relationship-row {
    background: rgba(255, 250, 243, 0.62);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
}

.relationship-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.picker-card {
    border: 1px solid var(--line);
    background: rgba(255, 250, 243, 0.75);
    padding: 16px;
}

.picker-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.picker-card p {
    margin: 0 0 10px;
    font-size: 0.88rem;
}

.clear-select {
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(99, 49, 26, 0.18);
    background: transparent;
    color: var(--accent-dark);
    cursor: pointer;
    font: inherit;
    font-size: 0.86rem;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid rgba(99, 49, 26, 0.18);
    border-radius: 14px;
    background: rgba(255, 250, 243, 0.95);
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
}

select[multiple],
.relation-select {
    min-height: 180px;
    padding: 8px;
}

textarea {
    resize: vertical;
    min-height: 110px;
}

.messages {
    margin-top: 14px;
}

.message {
    margin-bottom: 8px;
    padding: 12px 14px;
    border-radius: 16px;
}

.error-text {
    margin: 0;
    color: #982b22;
}

.empty-state {
    border-radius: 22px;
    padding: 22px;
    text-align: center;
}

@media (max-width: 920px) {
    .site-header,
    .hero,
    .detail-hero,
    .relationship-picker,
    .search-form {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .search-result-list {
        grid-template-columns: 1fr;
    }

    .branch-forest {
        width: 100%;
        margin: 0;
        padding: 6px 0 10px;
        text-align: left;
    }

    .branch-root {
        margin-left: 0;
        margin-right: 0;
        display: block;
    }

    .branch-hover-card {
        display: none;
    }

    .branch-children {
        flex-direction: column;
        align-items: center;
        width: auto;
    }

    .branch-node .branch-children::after,
    .branch-children::before,
    .branch-children > .branch-node::before {
        display: none;
    }
}

@media (max-width: 820px) {
    .person-form {
        grid-template-columns: 1fr;
    }

    .branch-card {
        width: min(132px, calc(100vw - 64px));
    }
}




.detail-tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.relationship-suggestion-form select {
    min-height: auto;
}

.duplicate-warning {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 246, 237, 0.96);
    border: 1px solid rgba(142, 75, 43, 0.16);
}

.duplicate-warning h3 {
    margin: 0;
    font-family: "Noto Serif Armenian", serif;
    font-size: 1rem;
}

.duplicate-warning p {
    margin: 8px 0 0;
    color: var(--muted);
}

.duplicate-warning ul {
    margin: 12px 0 0;
    padding-left: 18px;
}

.duplicate-warning li {
    margin-bottom: 6px;
}

.duplicate-warning span {
    color: var(--muted);
}

.path-highlight-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.branch-card-path {
    outline: 2px solid rgba(30, 110, 220, 0.82);
    box-shadow: 0 0 0 5px rgba(30, 110, 220, 0.22), var(--shadow);
}

.branch-node-path > .branch-card-shell > .branch-hover-card {
    border-color: rgba(30, 110, 220, 0.3);
}

.branch-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(99, 49, 26, 0.2);
    background: rgba(255, 250, 243, 0.94);
    color: var(--accent-dark);
    font: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.branch-node-collapsed > .branch-card-shell .branch-card {
    box-shadow: 0 14px 40px rgba(67, 37, 20, 0.1);
}

.branch-node-collapsed > .branch-children {
    display: none;
}

.detail-tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.relationship-suggestion-form select {
    min-height: auto;
}

.duplicate-warning {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 246, 237, 0.96);
    border: 1px solid rgba(142, 75, 43, 0.16);
}

.duplicate-warning h3 {
    margin: 0;
    font-family: "Noto Serif Armenian", serif;
    font-size: 1rem;
}

.duplicate-warning p {
    margin: 8px 0 0;
    color: var(--muted);
}

.duplicate-warning ul {
    margin: 12px 0 0;
    padding-left: 18px;
}

.duplicate-warning li {
    margin-bottom: 6px;
}

.duplicate-warning span {
    color: var(--muted);
}

.path-highlight-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.branch-card-path {
    outline: 2px solid rgba(30, 110, 220, 0.82);
    box-shadow: 0 0 0 5px rgba(30, 110, 220, 0.22), var(--shadow);
}

.branch-node-path > .branch-card-shell > .branch-hover-card {
    border-color: rgba(30, 110, 220, 0.3);
}

.branch-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(99, 49, 26, 0.2);
    background: rgba(255, 250, 243, 0.94);
    color: var(--accent-dark);
    font: inherit;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.branch-node-collapsed > .branch-card-shell .branch-card {
    box-shadow: 0 14px 40px rgba(67, 37, 20, 0.1);
}

.branch-node-collapsed > .branch-children {
    display: none;
}

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

.relationship-suggestion-form .relationship-picker-field input[type="search"] {
    width: 100%;
}

.relation-list {
    display: grid;
    gap: 10px;
}

.relation-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(99, 49, 26, 0.08);
}

.relation-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.quick-relation-form {
    margin: 0;
}

.inline-action-button {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(99, 49, 26, 0.18);
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.quality-hero h2 {
    margin: 0;
    font-family: "Noto Serif Armenian", serif;
}

.quality-summary {
    margin: 8px 0 0;
    color: var(--muted);
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.quality-card h3 {
    margin: 0 0 12px;
    font-family: "Noto Serif Armenian", serif;
}

.quality-card-wide {
    grid-column: 1 / -1;
}

.quality-list {
    display: grid;
    gap: 12px;
}

.quality-item {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 250, 243, 0.72);
    border: 1px solid rgba(99, 49, 26, 0.1);
}

.quality-item ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.quality-item li {
    margin-bottom: 4px;
}

.quality-item span,
.quality-item p {
    color: var(--muted);
    margin: 6px 0 0;
}

.quality-label {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.quality-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.quality-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quality-actions .button {
    padding: 6px 10px;
    font-size: 0.78rem;
}

.archive-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.archive-folder-card,
.archive-item-card {
    background: var(--panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 20px;
    overflow: hidden;
}

.archive-folder-link {
    display: block;
}

.archive-folder-cover {
    height: 180px;
    background: linear-gradient(135deg, rgba(142, 75, 43, 0.18), rgba(96, 125, 87, 0.18));
}

.archive-folder-cover img,
.archive-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.archive-folder-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-family: "Noto Serif Armenian", serif;
    font-size: 2.6rem;
    color: var(--accent-dark);
}

.archive-folder-content,
.archive-item-card {
    padding: 16px;
}

.archive-folder-content h3,
.archive-item-card h3 {
    margin: 0;
    font-family: "Noto Serif Armenian", serif;
}

.archive-folder-content p,
.archive-item-text,
.archive-item-caption {
    color: var(--muted);
}

.archive-preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.archive-preview-tags span,
.archive-item-type,
.archive-item-caption {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(142, 75, 43, 0.08);
    border: 1px solid rgba(99, 49, 26, 0.1);
    font-size: 0.78rem;
}

.archive-detail-hero {
    align-items: stretch;
}

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

.archive-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.archive-item-image-wrap {
    margin-top: 14px;
    border-radius: 16px;
    overflow: hidden;
}

.archive-item-text {
    margin-top: 14px;
    line-height: 1.7;
}

.archive-item-actions {
    margin-top: 14px;
}

.archive-item-list-compact {
    gap: 12px;
}

.archive-item-details {
    overflow: visible;
    padding: 0;
}

.archive-item-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
}

.archive-item-summary::-webkit-details-marker {
    display: none;
}

.archive-item-summary-main {
    position: relative;
    flex: 1 1 auto;
}

.archive-item-preview-text {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.archive-item-toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(99, 49, 26, 0.14);
    background: rgba(255, 250, 243, 0.9);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-dark);
}

.archive-item-details[open] .archive-item-toggle {
    background: rgba(142, 75, 43, 0.12);
}

.archive-item-details[open] .archive-item-toggle::after {
    content: "Փակել";
}

.archive-item-details[open] .archive-item-toggle {
    font-size: 0;
}

.archive-item-details[open] .archive-item-toggle::after {
    font-size: 0.82rem;
}

.archive-item-expanded {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(99, 49, 26, 0.08);
}

.archive-hover-shell {
    position: relative;
}

.archive-hover-card {
    position: absolute;
    left: 0;
    bottom: calc(100% + 12px);
    width: 300px;
    padding: 12px 13px;
    text-align: left;
    background: rgba(255, 250, 243, 0.98);
    border: 1px solid rgba(99, 49, 26, 0.16);
    box-shadow: 0 24px 60px rgba(67, 37, 20, 0.18);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    z-index: 4;
}

.archive-hover-card::after {
    content: "";
    position: absolute;
    left: 30px;
    bottom: -8px;
    width: 14px;
    height: 14px;
    background: rgba(255, 250, 243, 0.98);
    border-right: 1px solid rgba(99, 49, 26, 0.16);
    border-bottom: 1px solid rgba(99, 49, 26, 0.16);
    transform: rotate(45deg);
}

.archive-hover-shell:hover .archive-hover-card,
.archive-hover-shell:focus-within .archive-hover-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.archive-hover-card h5 {
    margin: 0;
    font-family: "Noto Serif Armenian", serif;
    font-size: 0.92rem;
}

.archive-hover-thumb {
    margin-top: 10px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
}

.archive-hover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 920px) {
    .archive-hover-card {
        display: none;
    }

    .archive-item-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}

.archive-folder-grid-soft {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.archive-folder-card-soft {
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(67, 37, 20, 0.08);
}

.archive-folder-card-soft:hover {
    transform: translateY(-2px);
    transition: transform 180ms ease, box-shadow 180ms ease;
    box-shadow: 0 18px 36px rgba(67, 37, 20, 0.12);
}

.archive-folder-cover-soft {
    height: 112px;
    background: linear-gradient(135deg, rgba(142, 75, 43, 0.12), rgba(96, 125, 87, 0.12));
}

.archive-folder-placeholder-soft {
    padding: 20px;
    place-items: start;
    align-content: end;
    font-size: 1rem;
    color: var(--muted);
}

.archive-folder-placeholder-soft .eyebrow {
    margin-bottom: 6px;
}

.archive-folder-placeholder-soft strong {
    display: block;
    font-family: "Noto Serif Armenian", serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-dark);
}

.archive-folder-content-soft {
    padding: 14px 16px 16px;
}

.archive-folder-content-soft h3 {
    font-size: 1.08rem;
    line-height: 1.22;
}

.archive-folder-content-soft p {
    margin: 6px 0 0;
    line-height: 1.55;
    font-size: 0.9rem;
}

.archive-folder-content-soft .eyebrow {
    margin-bottom: 6px;
}

.archive-preview-tags {
    margin-top: 10px;
}

.archive-preview-tags span {
    padding: 5px 9px;
    font-size: 0.74rem;
    background: rgba(142, 75, 43, 0.06);
}

.archive-item-details {
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(67, 37, 20, 0.07);
}

.archive-item-summary {
    padding: 12px 14px;
}

.archive-item-meta {
    margin-bottom: 8px;
}

.archive-item-summary h3 {
    font-size: 0.98rem;
    line-height: 1.25;
}

.archive-item-preview-text {
    font-size: 0.84rem;
    line-height: 1.45;
}

.archive-item-toggle {
    min-width: 74px;
    padding: 7px 10px;
    font-size: 0.78rem;
}

.archive-item-expanded {
    padding: 0 14px 14px;
}

.archive-explorer {
    background: rgba(255, 252, 248, 0.78);
    border: 1px solid rgba(99, 49, 26, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

.archive-explorer-head,
.archive-explorer-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(120px, 0.5fr) minmax(220px, 1fr) 92px;
    gap: 14px;
    align-items: center;
}

.archive-explorer-head {
    padding: 10px 14px;
    background: rgba(142, 75, 43, 0.06);
    border-bottom: 1px solid rgba(99, 49, 26, 0.08);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.archive-explorer-item {
    border-bottom: 1px solid rgba(99, 49, 26, 0.08);
    background: rgba(255, 251, 245, 0.72);
}

.archive-explorer-item:last-child {
    border-bottom: none;
}

.archive-explorer-row {
    position: relative;
    padding: 8px 14px;
    list-style: none;
    cursor: pointer;
    min-height: 52px;
}

.archive-explorer-row::-webkit-details-marker {
    display: none;
}

.archive-explorer-item[open] > .archive-explorer-row {
    background: rgba(193, 221, 250, 0.34);
}

.archive-col {
    min-width: 0;
}

.archive-col-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-file-thumb {
    flex: 0 0 22px;
    width: 22px;
    height: 28px;
    border: 1px solid rgba(99, 49, 26, 0.18);
    border-radius: 3px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(230, 220, 206, 0.92));
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.archive-file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.archive-file-icon {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--muted);
}

.archive-file-name {
    font-size: 0.92rem;
    line-height: 1.25;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-col-type,
.archive-col-meta {
    font-size: 0.82rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-col-action {
    display: flex;
    justify-content: flex-end;
}

.archive-row-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(99, 49, 26, 0.12);
    background: rgba(255,255,255,0.9);
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 600;
}

.archive-explorer-expanded {
    padding: 12px 14px 16px 46px;
    background: rgba(255, 251, 245, 0.94);
    border-top: 1px solid rgba(99, 49, 26, 0.06);
}

.archive-hover-card-explorer {
    left: 10px;
    bottom: calc(100% + 8px);
}

@media (max-width: 920px) {
    .archive-explorer-head {
        display: none;
    }

    .archive-explorer-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 10px 12px;
    }

    .archive-col-action {
        justify-content: flex-start;
    }

    .archive-col-type,
    .archive-col-meta {
        white-space: normal;
    }

    .archive-explorer-expanded {
        padding: 10px 12px 14px;
    }
}

.archive-explorer-item {
    overflow: hidden;
}

.archive-explorer-item[open] {
    background: rgba(193, 221, 250, 0.18);
}

.archive-explorer-item[open] > .archive-explorer-row {
    border-bottom: 1px solid rgba(99, 49, 26, 0.08);
}

.archive-explorer-expanded {
    padding: 14px 16px 18px 46px;
    background: rgba(255, 251, 245, 0.98);
}

.archive-item-image-wrap {
    margin-top: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(99, 49, 26, 0.08);
    border-radius: 14px;
    overflow: hidden;
}

.archive-explorer-expanded .archive-item-image {
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    object-position: center;
    background: rgba(255, 255, 255, 0.96);
}

@media (max-width: 920px) {
    .archive-explorer-expanded {
        padding: 12px;
    }
}

.archive-folder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 16px;
}

.archive-folder-actions .button {
    padding: 7px 10px;
    font-size: 0.8rem;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 250, 243, 0.98);
    border: 1px solid rgba(99, 49, 26, 0.12);
    box-shadow: 0 18px 45px rgba(67, 37, 20, 0.14);
    display: none;
    z-index: 120;
}

.nav-dropdown-menu a {
    display: block;
    padding: 9px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: rgba(142, 75, 43, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.about-card {
    background: var(--panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 20px;
    padding: 18px;
}

.about-card-wide {
    grid-column: 1 / -1;
}

.about-card h3 {
    margin: 0;
    font-family: "Noto Serif Armenian", serif;
    font-size: 1.05rem;
}

.about-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.about-placeholder {
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed rgba(99, 49, 26, 0.2);
    background: rgba(255, 250, 243, 0.72);
}

@media (max-width: 920px) {
    .nav-dropdown-menu {
        position: static;
        display: block;
        min-width: 100%;
        margin-top: 6px;
        box-shadow: none;
    }
}


.nav-dropdown {
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    cursor: default;
}

.nav-dropdown-menu {
    top: 100%;
    pointer-events: auto;
}
