/* ========================================================================== 
   THE ARKIVIST — SHARED STYLES

   Keep this file expanded and readable. When several parts of the site share
   the same appearance, group their selectors instead of repeating the rules.
   Page-specific styles belong in the sections below, not in separate copies
   of common colors, borders, spacing, or typography.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   Change these values once to adjust the common look across the application.
   -------------------------------------------------------------------------- */
:root {
    --color-text: #222;
    --color-white: #fff;
    --color-muted: #666;
    --color-page: #f4f4f4;
    --color-header: #080808;

    --color-border: #ccc;
    --color-border-soft: #ddd;
    --color-border-strong: #aaa;

    --color-primary: #579515;
    --color-primary-hover: #42770f;
    --color-secondary: #087fae;
    --color-danger: #c9151e;

    --button-hover-darkness: 0.25;
    --button-hover-duration: 180ms;

    --font-body: Arial, Helvetica, sans-serif;
    --font-monospace: ui-monospace, monospace;

    --space-small: 10px;
    --space-medium: 16px;
    --space-large: 24px;

    --radius-small: 5px;
    --radius-medium: 9px;
}

/* --------------------------------------------------------------------------
   2. Global page structure and typography
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-page);
    color: var(--color-text);
    font: 16px var(--font-body);
}

.topbar,
footer {
    background: var(--color-header);
}

.topbar {
    color: var(--color-white);
    padding: 18px 24px;
}

.topbar-inner,
main {
    max-width: 1180px;
    margin: 0 auto;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: .2px;
}

.brand img {
    display: block;
    width: min(320px, 65vw);
    height: auto;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border: 3px solid var(--color-white);
    border-radius: 50%;
    font-size: 25px;
}

.topbar a {
    color: var(--color-white);
    text-decoration: none;
}

.topbar-user-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 18px;
    margin-left: auto;
    padding: 0 0 5px;
    font: 14px/1.2 'Oxygen', sans-serif;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}

.topbar-avatar-wrap {
    display: inline-flex;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
    background: #000;
}

.topbar-avatar {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.topbar-greeting {
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
}

.topbar-account-link {
    display: inline-block;
    color: #ffffff !important;
    text-decoration: none;
    text-transform: lowercase;
    white-space: nowrap;
}

.topbar-account-link:hover {
    color: #e5e5e5 !important;
    text-decoration: underline;
}

.topbar-nav-icon {
    margin-left: 3px;
    font-size: 15px;
}

.topbar-options-link .topbar-nav-icon {
    color: #579515;
}

.topbar-logout-link .topbar-nav-icon {
    color: #df0000;
}

.topbar-account-link[aria-disabled="true"] {
    cursor: default;
}

.topbar-utility {
    display: inline-block;
    padding: 0;
    border: 0;
    font: 14px/1.2 'Oxygen', sans-serif;
    font-weight: normal;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}

.topbar-utility:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

main {
    padding: 28px 20px;
}

.page-title {
    margin: 0 0 24px;
    font-size: 30px;
}

.section-title {
    margin: 0 0 20px;
    padding: 12px 16px;
    background: #000;
    color: var(--color-white);
    font-size: 20px;
}

footer {
    padding: 25px;
    color: #aaa;
    text-align: center;
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   3. Shared surfaces, borders, and messages
   -------------------------------------------------------------------------- */
.panel,
.item-card,
.ocr-snippet {
    background: var(--color-white);
    border: 1px solid var(--color-border);
}

.panel {
    margin-bottom: 22px;
    padding: 24px;
}

.item-card {
    min-width: 0;
    padding: 14px;
}

.ocr-snippet {
    padding: 10px;
}

.notice,
.error {
    margin-bottom: 18px;
    padding: 12px;
}

.notice {
    background: #e8f2e0;
    border: 1px solid #8ab36d;
}

.error {
    background: #fde8e8;
    border: 1px solid #c66;
}

.help {
    color: var(--color-muted);
    font-size: 14px;
}

.meta {
    color: var(--color-muted);
    font-size: 13px;
}

.item-id {
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   4. Shared form controls and buttons
   -------------------------------------------------------------------------- */
.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-medium);
}

.field label {
    display: block;
    padding: 7px 9px;
    background: #bdbdbd;
    color: var(--color-white);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Common control appearance; layout and sizing remain with each component. */
.field input,
.field select,
.field textarea,
.collection-filter select,
.filter-form select,
.ocr-select-controls select,
.page-picker select {
    border: 1px solid var(--color-border-strong);
    background: var(--color-white);
    color: var(--color-text);
    font: 16px var(--font-body);
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 10px;
}

.field textarea {
    min-height: 90px;
    resize: vertical;
}

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

.actions {
    display: flex;
	justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.btn,
.photo-action {
    display: inline-block;
    border: 0;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.photo-action {
    display: inline-block !important;
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
}

.btn {
    padding: 12px 20px;
    font-size: 16px;
}


.btn.secondary {
    background: var(--color-secondary);
}

.btn.danger {
    background: var(--color-danger);
}

.btn.light {
    background: #e8edf2;
    color: #263548;
}

.btn.btn_root_index {
	text-transform: uppercase;
}

/* Search results use the same collection layout, with a compact context heading. */
.search-results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
}

.search-results-heading h1 {
    margin: 0 0 4px;
    font: 900 22px 'Lato', Arial, sans-serif;
    letter-spacing: .5px;
}

.search-results-heading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.search-return-form {
    flex: 0 0 auto;
    margin: 0;
}

@media (max-width: 520px) {
    .search-results-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
   5. Collection toolbar, search, cards, and pagination
   -------------------------------------------------------------------------- */
.collection-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
}

.collection-filter,
.filter-form {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.collection-filter select,
.filter-form select {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: var(--radius-medium);
    color: #0755d9;
}

.collection-add {
    margin: 0;
    white-space: nowrap;
}

.collection-search {
    flex: 0 1 320px;
    min-width: 190px;
    margin: 0;
}

.search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-medium);
    background: var(--color-white);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08);
}

.search-field:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(87, 149, 21, .16);
}

.search-field svg {
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #666;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-field input {
    width: 100%;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font: 16px var(--font-body);
    box-shadow: none;
}

.search-field input::placeholder {
    color: #888;
    opacity: 1;
}

.visually-hidden-submit {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 18px;
}

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

.item-card-link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    color: inherit;
    text-decoration: none;
}

.item-card-link:hover h3,
.item-card > p a:hover {
    text-decoration: underline;
}

.item-card > p a {
    color: #0755d9;
    text-decoration: none;
}

.item-card img,
.thumb,
.picture-strip img,
.ocr-photo img {
    background: #eee;
    object-fit: contain;
}

.item-card img {
    width: 100%;
    height: 190px;
}

.item-card h3 {
    margin: 10px 0 5px;
}

.item-card-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
/*    margin: auto 0 8px;*/
    padding-top: 30px;
}

.item-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 5px solid var(--color-text);
    border-radius: 10px;
    background: var(--color-white);
    color: var(--color-text);
    text-decoration: none;
}

.item-icon-link svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.item-icon-link:hover {
    border-color: var(--color-primary);
    background: #e9f2e3;
    color: var(--color-primary-hover);
}

.item-icon-link.delete {
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.item-icon-link.delete:hover {
    background: #fde8e8;
}

.item-detail-actions {
    margin: 0 0 22px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 12px 0 22px;
    padding: 12px 8px;
    border-top: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
    text-align: center;
}

.pagination-count {
    color: var(--color-text);
    font-size: 16px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.page-nav {
    display: inline-block;
    padding: 5px 9px;
    background: #777;
    color: var(--color-white);
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

.page-nav:hover {
    background: #333;
}

.page-nav.disabled {
    background: #aaa;
    color: var(--color-white);
}

.page-picker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.page-picker select {
    min-width: 42px;
    padding: 3px 5px;
    border-color: #888;
    border-radius: var(--radius-small);
}

/* --------------------------------------------------------------------------
   6. Item details and photo handling
   -------------------------------------------------------------------------- */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.upload-slot {
    min-height: 150px;
    padding: 10px;
    border: 2px solid var(--color-text);
    background: var(--color-white);
    text-align: center;
}

.upload-slot input {
    width: 100%;
    margin-top: 16px;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-field {
    padding: 8px 4px;
    border-bottom: 1px solid var(--color-border-soft);
}

.detail-field strong {
    display: block;
    margin-bottom: 5px;
    color: var(--color-muted);
    font-size: 12px;
}

.detail-field div {
    overflow-wrap: anywhere;
}

.picture-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.picture-strip img {
    width: 150px;
    height: 150px;
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.thumb {
    width: 100%;
    height: 150px;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .9);
}

.lightbox img {
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
}

/* Item-detail gallery navigation controls. */
.lightbox {
    box-sizing: border-box;
    gap: 18px;
}
.lightbox > img {
    max-width: min(82vw, 1500px);
    max-height: 88vh;
    position: relative;
    z-index: 1;
}
/* Keep controls anchored to the viewport, not in the flex image layout. */
.lightbox-nav,
.lightbox-close {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    line-height: 1;
    z-index: 2;
}
.lightbox-nav {
    top: 50%;
    width: 52px;
    height: 52px;
    font-size: 22px;
    transform: translateY(-50%);
    background: rgba(25,25,25,.82) !important;
    color: #fff !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease, background-color .15s ease;
}
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
.lightbox-close {
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    font-size: 30px;
    line-height: 1;
    z-index: 3;
    background: transparent !important;
    color: #e53935 !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.lightbox-nav[hidden] { display: none; }
/* Keep the dark circular button; use the site green only for interaction feedback. */
.lightbox .lightbox-nav:hover {
    background: rgba(25,25,25,.82) !important;
    color: #579515 !important;
}
.lightbox .lightbox-nav:focus,
.lightbox .lightbox-nav:focus-visible {
    background: rgba(25,25,25,.82) !important;
    color: #fff !important;
}
.lightbox .lightbox-nav:active {
    background: rgba(25,25,25,.82) !important;
    color: #579515 !important;
}
/* Touch devices should return to white after the tap; no sticky hover/focus color. */
@media (hover: none) and (pointer: coarse) {
    .lightbox .lightbox-nav:hover,
    .lightbox .lightbox-nav:focus,
    .lightbox .lightbox-nav:focus-visible {
        color: #fff !important;
    }
    .lightbox .lightbox-nav:active {
        color: #579515 !important;
    }
}
.lightbox .lightbox-close:hover,
.lightbox .lightbox-close:active {
    background: transparent !important;
    color: #ff5252 !important;
}
.lightbox-nav:focus-visible,
.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}
.lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    color: #fff;
    font: 700 14px/1.2 Lato, Arial, sans-serif;
    text-shadow: 0 1px 3px #000;
    transform: translateX(-50%);
}
body.arkivist-lightbox-open { overflow: hidden; }
@media (max-width: 600px) {
    .lightbox { padding: 54px 12px; }
    .lightbox > img { max-width: 94vw; max-height: 78vh; }
    .lightbox-nav { width: 42px; height: 42px; font-size: 18px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-close { top: 10px; right: 10px; }
}
.photo-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photo-input-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--color-border);
    background: #fafafa;
}

.photo-action {
    min-width: 170px;
    padding: 11px 16px !important;
    border-radius: 0;
    text-align: center;
}

.photo-input-row input[type="file"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
}

.photo-input-row input[type="file"]:focus-visible + .photo-filename {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

.photo-filename {
    color: var(--color-muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.photo-input-row.is-selected {
    border-color: var(--color-primary);
    background: #f5faef;
}

.photo-input-row.is-selected .photo-action {
    background: var(--color-secondary) !important;
}

/* --------------------------------------------------------------------------
   7. OCR review and region selection
   -------------------------------------------------------------------------- */
.ocr-results {
    margin-top: 18px;
}

.ocr-photo,
.ocr-photo-select {
    padding: 18px 0;
    border-top: 1px solid var(--color-border-soft);
}

.ocr-photo {
    display: grid;
    grid-template-columns: minmax(180px, 30%) 1fr;
    gap: 18px;
}

.ocr-photo:first-child {
    border-top: 0;
}

.ocr-photo img {
    width: 100%;
    max-height: 360px;
    border: 1px solid var(--color-border);
}

.ocr-photo-title {
    margin: 0 0 10px;
    font-weight: bold;
}

.ocr-raw,
.ocr-archive pre {
    padding: 10px;
    background: #f7f7f7;
    font: 13px/1.5 var(--font-monospace);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ocr-raw {
    border: 1px solid var(--color-border-soft);
}

.ocr-snippets {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.ocr-snippet-text {
    margin-bottom: 9px;
    font-family: var(--font-monospace);
    overflow-wrap: anywhere;
}

.ocr-tag-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ocr-tag-buttons button {
    padding: 6px 9px;
    border: 0;
    font-size: 11px;
    cursor: pointer;
}

.ocr-tag-buttons .secondary {
    background: #e9edf2;
    color: #263548;
}

.ocr-tag-buttons .ignore {
    background: #f3f4f6;
    color: #68717d;
}

.ocr-tag-buttons .review-jump {
    background: #263b59;
    color: var(--color-white);
    font-weight: bold;
}

.ocr-snippet.assigned,
.ocr-region-result.assigned,
.ocr-barcode.assigned {
    border: 2px solid #00cc22;
    background: #00ff2a;
}

.ocr-review-source {
    min-height: 15px;
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 11px;
}

.ocr-warning {
    margin-top: 8px;
    padding: 9px;
    background: #fff5e8;
    color: #9b4a00;
}

.ocr-status {
    padding: 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: bold;
}

.ocr-status-complete {
    color: #168000;
    font-weight: 700;
}

.ocr-status-error {
    color: var(--color-danger);
    font-weight: 700;
}

.ocr-select-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid #bbb;
    background: #eee;
    line-height: 0;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.ocr-select-stage img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 520px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.ocr-select-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    touch-action: none;
    cursor: crosshair;
}

.ocr-selection-box {
    position: absolute;
    border: 3px solid #00c92a;
    background: rgba(0, 255, 42, .16);
    box-shadow: 0 0 0 1px #fff inset;
    pointer-events: none;
}

.ocr-select-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

.ocr-select-controls select {
    max-width: 100%;
    min-height: 44px;
    padding: 8px 12px;
}

.ocr-region-results {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.ocr-region-result {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    border: 1px solid #c9d6c3;
    background: #f5fff2;
}

.ocr-region-result .ocr-snippet-text {
    flex: 1;
    min-width: 180px;
    margin: 0;
    overflow-wrap: anywhere;
}

.ocr-barcode {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding: 9px;
    background: #f2f5f8;
}

.ocr-archive {
    margin-top: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--color-border-soft);
}

.ocr-archive summary {
    color: #334;
    font-weight: bold;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   8. Responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
    main {
        padding: 18px 12px;
    }

    .topbar {
        padding: 14px;
    }

    .panel {
        padding: 15px;
    }

    .page-title {
        font-size: 25px;
    }

    .field-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .collection-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .collection-filter,
    .collection-add,
    .collection-search {
        width: 100%;
        flex: 0 0 auto;
    }

    .collection-add {
        text-align: center;
    }

    .collection-search {
        min-width: 0;
    }

    .ocr-photo {
        grid-template-columns: 1fr;
    }

    .photo-input-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .photo-action {
        width: 100%;
        min-width: 0;
    }

    .ocr-select-stage img {
        max-height: 420px;
    }

    .ocr-select-controls > * {
        flex: 1 1 100%;
    }

    .ocr-select-controls button {
        width: 100%;
    }

    .ocr-region-result {
        align-items: flex-start;
    }

    .ocr-region-result .btn {
        width: 100%;
    }

    /* Stack collection pagination into three clear mobile rows. */
    .pagination {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "count count"
            "page page"
            "previous next";
        gap: 0 12px;
        align-items: center;
        justify-items: center;
    }

    .pagination-count {
        grid-area: count;
        width: 100%;
        padding-bottom: 10px;
    }

    /* Let the page selector and navigation buttons participate in the
       parent grid so they can occupy separate rows on narrow screens. */
    .pagination-controls {
        display: contents;
    }

    .page-picker {
        grid-area: page;
        justify-content: center;
        width: 100%;
        padding: 10px 0;
        border-top: 0;
    }

    .page-previous {
        grid-area: previous;
    }

    .page-next {
        grid-area: next;
    }

    .page-previous,
    .page-next {
        width: 100%;
        margin-top: 10px;
        padding: 8px 6px;
        text-align: center;
        border-top: 1px solid #ddd;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 15px;
    }

    .brand-mark {
        width: 30px;
        height: 30px;
        margin-right: 6px;
        font-size: 20px;
    }

    .topbar-utility {
        padding: 8px 9px;
        font-size: 11px;
    }

    .collection-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form,
    .collection-actions > .btn {
        width: 100%;
    }

    .collection-actions > .btn {
        text-align: center;
    }

    .item-card-actions {
        gap: 10px;
    }

    .item-icon-link {
        width: 46px;
        height: 46px;
    }
}

/* ========================================================================== 
   9. THE ORIGINAL ARKIVIST SKIN

   The application structure above remains the 2026 implementation. These
   presentation rules restore the original site's typography, proportions,
   square gallery cards, black headings, and green/cyan accents without
   bringing the old fixed-width layout or legacy CSS patches back.
   ========================================================================== */
:root {
    --color-text: #000000;
    --color-white: #ffffff;
    --color-muted: #5a5a5a;
    --color-page: #ffffff;
    --color-header: #000000;
    --color-border: #c2c2c2;
    --color-border-soft: #e5e5e5;
    --color-border-strong: #a9a9a9;
    --color-primary: #6d8300;
    --color-primary-hover: #536500;
    --color-secondary: #00acc6;
    --color-danger: #df0000;
    --font-body: 'Lato', sans-serif;
}

body {
    background: #ffffff;
    color: #000000;
    font-family: 'Lato', sans-serif;
    line-height: 1.2;
}

.topbar {
    padding: 0 20px;
    background: #000000;
}

.topbar-inner {
    max-width: 960px;
    min-height: 120px;
    gap: 12px;
}

.brand img {
    width: min(320px, 65vw);
    max-height: 120px;
    object-fit: contain;
    object-position: left center;
}

.topbar-utility {
    border: 0;
/*    padding: 8px 10px;
    color: #00acc6 !important;
    font-family: 'Oxygen', sans-serif;*/
    font-size: 14px;
    letter-spacing: 0;
}

.topbar-utility:hover {
    background: transparent;
    color: #ffffff !important;
    text-decoration: underline;
}

main {
    max-width: 960px;
    padding: 20px 0 30px;
}

.page-title {
    margin: 8px 0 18px;
    color: #000000;
    font-family: 'Lato', sans-serif;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.section-title {
    margin: 10px 0;
    padding: 10px;
    background: #000000;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

footer {
/*    padding: 8px 16px;*/
    background: #000000;
    color: #a9a9a9;
    font-family: 'Lato', sans-serif;
}

.footer-inner {
    display: flex;
    align-items: start;
    gap: 1px;
    max-width: 960px;
    min-height: 180px;
    margin: 0 auto;
}

.footer-inner img {
    display: block;
    width: min(300px, 40%);
    height: auto;
    object-fit: contain;
}

.footer-inner p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
	text-align: left;
	padding-top: 5px;
}

.panel,
.item-card,
.ocr-snippet {
    border: 1px solid #e5e5e5;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.panel {
    padding: 18px;
}

.field label {
    padding: 7px 8px;
    background: #c2c2c2;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    letter-spacing: .2px;
}

.field input,
.field select,
.field textarea,
.collection-filter select,
.filter-form select,
.ocr-select-controls select,
.page-picker select {
    border: 2px solid #c2c2c2;
    border-radius: 0;
    background: #ffffff;
    color: #6d8300;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    box-shadow: none;
}

.collection-filter select, .filter-form select {
    /* Keep the collection pulldown prominent, but scale its text on narrow phones. */
    font-size: clamp(14px, 4.8vw, 20px);
    height: 42px;
    font-weight: bold;
}

.field select {
	font-size: 20px;
	font-weight: bold;
}

.field input,
.field select,
.field textarea {
    padding: 8px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.collection-filter select:focus,
.search-field:focus-within {
    border-color: #6d8300;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(109, 131, 0, .14);
}

.btn,
.photo-action {
    border-radius: 6px;
    background: #6d8300;
    color: #ffffff;
    font-family: 'Oxygen', sans-serif;
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}

.btn {
    padding: 10px 16px;
    font-size: 15px;
	font-family: 'Lato', sans-serif;
}

/* Universal hover feedback: darken the existing button color and reveal
   a true 1px animated conic-gradient border. */
@property --arkivist-button-border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.btn,
.photo-action {
    position: relative;
    isolation: isolate;
    transition: box-shadow var(--button-hover-duration) ease;
}

.btn::after,
.photo-action::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    box-sizing: border-box;
    padding: 2px;
    border-radius: inherit;
    /* Keep most of the ring charcoal, with a distinct silver sweep so
       the rotation is visibly apparent rather than rotationally symmetric. */
    background: conic-gradient(
        from var(--arkivist-button-border-angle),
        #626262 0deg 300deg,
        #c2c2c2 330deg,
        #626262 360deg
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
                  linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box,
          linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--button-hover-duration) ease;
}

@keyframes arkivist-button-border-spin {
    to { --arkivist-button-border-angle: 360deg; }
}

/* Small one-shot icon pop, scoped to shared buttons only.
   This does not affect the separate account/user-menu icon animations. */
@keyframes arkivist-button-icon-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover,
    .photo-action:hover {
        box-shadow: inset 0 0 0 9999px
            rgba(0, 0, 0, var(--button-hover-darkness));
    }

    .btn:hover::after,
    .photo-action:hover::after {
        opacity: 1;
        animation: arkivist-button-border-spin 1.6s linear infinite;
    }

    .btn i {
        display: inline-block;
        transform-origin: center;
    }

    .btn:hover i {
        animation: arkivist-button-icon-pop 260ms ease-out both;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .photo-action,
    .btn::after,
    .photo-action::after {
        transition-duration: 0.01ms;
    }

    .btn:hover::after,
    .photo-action:hover::after {
        animation: none;
    }

    .btn:hover i {
        animation: none;
    }
}

.btn.secondary {
    background: #00acc6;
}


.btn.danger {
    background: #df0000;
}

.btn.light {
    border: 1px solid #a9a9a9;
    background: #e5e5e5;
    color: #000000;
    text-shadow: none;
}

.collection-toolbar {
    gap: 10px;
    margin-bottom: 16px;
}

.collection-filter select,
.filter-form select {
    min-height: 42px;
    padding: 8px 10px;
    color: #6d8300;
}

.collection-add {
    flex: 0 0 auto;
    padding: 11px 16px;
    white-space: nowrap;
}

.collection-search {
    flex-basis: 290px;
}

/* In the stacked mobile toolbar, use the search form's natural content height. */
@media (max-width: 700px) {
    .collection-search {
        flex: 0 0 auto;
        flex-basis: auto;
    }
}

.search-field {
    min-height: 42px;
    padding-left: 10px;
    border: 1px solid #c2c2c2;
    border-radius: 7px;
    box-shadow: none;
}

.search-field input {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

.search-field svg {
    stroke: #6d8300;
}

.item-list {
    grid-template-columns: repeat(auto-fill, 180px);
    justify-content: center;
    gap: 12px;
}

.item-card {
    width: 180px;
    min-height: 270px;
    padding: 0 0 8px;
    background: #ffffff;
    border-color: #5a5a5a;
	border-radius: 5px;
	overflow: hidden;
}

.item-card-link {
    width: 100%;
}

.item-card img {
    width: 178px;
    height: 180px;
    margin: 0 auto;
    background: #ffffff;
    object-fit: contain;
}

.item-card h3 {
    margin: 8px auto 4px;
    width: 162px;
    color: #000000;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
}

.item-card-link > div {
    width: 162px;
    margin: 0 auto;
    color: #5a5a5a;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    line-height: 1.15;
}

/*.item-card-actions {
    gap: 8px;
    margin: auto 0 0;
    padding-top: 12px;
    background-color: #5a5a5a;}*/

.item-icon-link {
    width: 36px;
    height: 36px;
    border: 1px solid #a9a9a9;
    border-radius: 3px;
    background: #ffffff;
    color: #5a5a5a;
}

.item-icon-link svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.8;
}

.item-icon-link:hover {
    border-color: #6d8300;
    background: #eef2df;
    color: #536500;
}

.item-icon-link.delete {
    border-color: #df0000;
    color: #df0000;
}

.item-icon-link.delete:hover {
    background: #fff0f0;
}

.pagination {
    gap: 12px;
    margin: 12px 0 18px;
    padding: 10px 4px;
    border-top: 1px solid #a9a9a9;
    border-bottom: 1px solid #a9a9a9;
}

.pagination-count,
.page-picker {
    color: #5a5a5a;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

.page-picker select {
    min-height: 32px;
    padding: 4px 6px;
}

.page-nav {
    padding: 6px 9px;
    border: 1px solid #a9a9a9;
    color: #000000;
    font-family: 'Oxygen', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
	border-radius: 5px;
}

/* Only live navigation links receive the green Arkivist hover treatment. */
a.page-nav:not(.disabled):hover,
a.page-nav:not(.disabled):focus-visible {
    border-color: #6d8300;
    background: #6d8300;
    color: #ffffff;
}

.page-nav.disabled {
    border-color: #c2c2c2;
    background: #e5e5e5;
    color: #a9a9a9;
    cursor: default;
}

.notice {
    border-color: #6d8300;
    background: #f1f5e5;
    color: #354000;
}

.help,
.meta {
    color: #5a5a5a;
}

@media (max-width: 980px) {
    main {
        width: calc(100% - 32px);
        padding-top: 18px;
    }

    .topbar-inner {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .topbar {
        padding: 0 12px;
    }

    .topbar-inner {
        min-height: 88px;
    }

    .brand img {
        width: min(260px, 62vw);
    }

    main {
        width: calc(100% - 24px);
        padding: 16px 0 24px;
    }

    .page-title {
        font-size: 24px;
    }

    .collection-toolbar {
        gap: 8px;
    }

    .item-list {
        grid-template-columns: repeat(auto-fill, 180px);
        gap: 10px;
    }
}

@media (max-width: 520px) {
    .topbar-inner {
        min-height: 76px;
    }

    .topbar-utility {
        padding: 6px 4px;
        font-size: 12px;
    }

    .page-title {
        font-size: 21px;
    }

    /* Keep the footer in two columns on narrow screens.
       The logo scales down to preserve room for the copyright text. */
    .footer-inner {
        min-height: 0;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }

    .footer-inner img {
        flex: 0 1 36%;
        width: 36%;
        max-width: 170px;
        min-width: 0;
        height: auto;
    }

    .footer-inner p {
        flex: 1 1 0;
        min-width: 0;
        padding-top: 2px;
        overflow-wrap: break-word;
    }

    .section-title {
        font-size: 19px;
    }
}


/* --------------------------------------------------------------------------
   Mobile collection spacing and pagination interaction fixes
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
    main {
        display: block;
        min-height: 0;
        height: auto;
    }

    .collection-toolbar {
        margin-bottom: 12px;
    }

    .collection-toolbar + .pagination {
        margin-top: 0 !important;
    }
}


/* --------------------------------------------------------------------------
   Original Arkivist account links in the shared 2026 header
   -------------------------------------------------------------------------- */

.topbar {
    padding: 0 20px;
}

.topbar-inner {
    min-height: 120px;
    max-width: 960px;
    align-items: flex-end;
    position: relative;
}

.brand {
    flex: 0 0 auto;
}

.topbar-user-nav {
    align-self: flex-end;
    padding-bottom: 7px;
}

@media (max-width: 700px) {
    .topbar {
        padding: 0 14px 12px;
    }

    .topbar-inner {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .topbar-user-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
        padding: 7px 0 0;
        border-top: 1px solid rgba(255, 255, 255, .35);
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .topbar-user-nav {
        gap: 9px;
        font-size: 12px;
    }
}


/* Full AI intake and centered item actions */
.arkivist-centered-actions,
.item-detail-actions.arkivist-centered-actions {
    justify-content: center;
    text-align: center;
}

.upload-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.upload-method {
    border: 1px solid var(--color-border, #bbb);
    border-radius: 8px;
    padding: 18px;
	text-align: center;
	display: flex;
	flex-direction: column;
}

.upload-method h3 {
    margin: 0 0 10px;
}

.upload-method p {
    line-height: 1.5;
}

.upload-method button {
    text-align: center;
	margin-top: auto;
	align-self: center;
}

.full-ai-progress {
    height: 10px;
    margin: 14px 0 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #e2e2e2;
}
#full-ai-progress-bar {
    width: 0;
    height: 100%;
    background: #789500;
    transition: width .35s ease;
}
#full-ai-stage {
    margin: 8px 0 16px;
    color: var(--color-text, #333);
    font-weight: 700;
}
.full-ai-summary {
    margin: 12px 0;
    font-weight: 700;
}
.full-ai-suggestion {
    margin: 10px 0;
    padding: 12px;
    border: 1px solid #c8d6a3;
    border-left: 4px solid #789500;
    border-radius: 5px;
}
.full-ai-suggestion-value {
    margin: 5px 0;
    overflow-wrap: anywhere;
}
.full-ai-suggestion small {
    display: block;
    color: #666;
    line-height: 1.45;
}
@media (max-width: 680px) {
    .upload-methods {
        grid-template-columns: 1fr;
    }
}


/* --------------------------------------------------------------------------
   FULL AI - THE ARKIVIST PULSING LOGO LOADER
   The PNG remains stationary. Its transparent openings reveal the layers below.
   -------------------------------------------------------------------------- */
.logo-loader {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: block;
    margin: 24px auto 10px;
}

.logo-loader::before {
    content: "";
    position: absolute;
    top: -25%;
    left: -25%;
    width: 150%;
    height: 150%;
    background: conic-gradient(
        from 0deg,
        #6d8300 0deg,
        #6d8300 180deg,
        #6d8300 360deg
    );
    animation: arkivistSmoothSpin 3s linear infinite;
    z-index: 1;
}

.logo-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #ffffff;
    animation: arkivistWhitePulse 0.5s ease-in-out infinite alternate;
    z-index: 2;
}

.logo-loader img {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: block;
}

/* After Full AI finishes, leave only the stationary logo on white. */
.logo-loader.is-complete {
    background: #ffffff;
}

.logo-loader.is-complete::before,
.logo-loader.is-complete::after,
.logo-loader.is-stopped::before,
.logo-loader.is-stopped::after {
    display: none;
    animation: none;
}

/* Some component display rules can override the browser's default hidden style. */
.logo-loader[hidden],
.full-ai-cancel-button[hidden] {
    display: none !important;
}

/* Keep AI-authored line breaks in the preview, matching the saved textarea. */
.full-ai-suggestion-value {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@keyframes arkivistSmoothSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes arkivistWhitePulse {
    from { opacity: 0; }
    to { opacity: 0.85; }
}

.arkivist-ai-progress-message {
    color: #159b20;
    text-align: center;
    font-size: clamp(17px, 3vw, 27px);
    font-weight: 700;
    line-height: 1.2;

    display: flex;
    align-items: baseline;
    gap: 0.4em;
    font-size: clamp(18px, 2vw, 30px);
    font-weight: 900;
    line-height: 1.2;
}

.arkivist-ai-progress-subheading {
    margin: 5px 0 18px;
    color: #000;
    text-align: center;
    font-size: clamp(11px, 1.8vw, 15px);
    font-weight: 700;
}

.arkivist-ai-progress-message.is-complete {
    margin: 14px 0;
}

.arkivist-ai-progress-message.is-error {
    color: #b42318;
    margin: 14px 0;
}

/* Cancellation is a final status message, not a rotating progress message. */
.arkivist-ai-progress-message.is-cancelled {
    justify-content: center;
}

.arkivist-ai-progress-message.is-cancelled .full-ai-progress-message-text {
    display: block;
    width: 100%;
    text-align: center;
}

@media (max-width: 480px) {
    .logo-loader { width: 112px; height: 112px; }
}

@media (prefers-reduced-motion: reduce) {
    .logo-loader::before, .logo-loader::after { animation: none; }
}


/* Long cataloguing notes grow to show their full contents. */
.field textarea.arkivist-auto-grow {
    min-height: 180px;
    height: auto;
    overflow-y: hidden;
    resize: vertical;
    white-space: pre-wrap;
}

/* One-time saved notice gently dismisses after the user has seen it. */
.notice {
    transition: opacity 0.45s ease, max-height 0.45s ease, margin 0.45s ease, padding 0.45s ease;
}
.notice.is-dismissing {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}


/* Item-page collection controls and bottom navigation actions. */
.item-page-toolbar { margin-top: 4px; margin-bottom: 24px; }
.item-page-bottom-actions {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap;
    column-gap: 14px !important;
    row-gap: 12px !important;
    width: 100%;
    margin: 32px auto 16px !important;
    text-align: center;
}
.item-page-bottom-actions > .btn,
.item-page-bottom-actions > button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 180px;
    margin: 0 !important;
    text-align: center;
}
@media (max-width: 700px) {
    .item-page-bottom-actions { flex-direction: column !important; align-items: center !important; }
    .item-page-bottom-actions > .btn,
    .item-page-bottom-actions > button { width: min(100%, 320px); }
}

/* Immediate server-generated previews on the one-photo-at-a-time upload page. */
.uploaded-photo-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}
.uploaded-photo-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 120px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: bold;
}
.uploaded-photo-preview img {
    display: block;
    width: 120px;
    height: 160px;
    object-fit: contain;
    background: #f1f1f1;
    border: 1px solid var(--color-border);
}
.photo-input-row.is-uploaded {
    border-color: var(--color-secondary);
    background: #f5faef;
}

/* Details-page thumbnails retain their lightbox, with a clear magnifier affordance. */
.picture-thumb {
    position: relative;
    display: inline-block;
    width: 150px;
    height: 200px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: #f1f1f1;
}
.picture-thumb > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 0;
    cursor: zoom-in;
}
.picture-lightbox-button {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 50%;
    background: rgba(20, 25, 32, .78);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,.35);
}
.picture-lightbox-button:hover,
.picture-lightbox-button:focus-visible {
    background: rgba(20, 25, 32, .96);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.full-ai-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.full-ai-actions .help {
    flex-basis: 100%;
    margin: 0;
}
.full-ai-actions[hidden],
#upload-methods[hidden] {
    display: none !important;
}
#full-ai-status.is-inconclusive {
    color: #8a5a00;
}


/* Show each uploaded server thumbnail beside its upload confirmation. */
.photo-uploaded-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    text-align: center;
}
.photo-uploaded-result .photo-filename {
    display: block;
    width: 100%;
    text-align: center;
}
.photo-uploaded-thumbnail {
    display: block;
    width: 90px;
    height: 120px;
    object-fit: contain;
    border: 1px solid var(--color-border);
    background: #fff;
}


/* Optional non-Roman script translation preference on the Full AI upload card. */
.arkivist-translation-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 12px;
    border: 1px solid var(--color-border, #d5d5d5);
    border-radius: 7px;
    text-align: left;
    cursor: pointer;
}
.arkivist-translation-option input { flex: 0 0 auto; margin-top: 3px; }
.arkivist-translation-option span { display: flex; flex-direction: column; gap: 5px; }
.arkivist-translation-option small { color: var(--color-muted, #666); line-height: 1.45; }
.full-ai-language-block { margin-top: 9px; }
.full-ai-language-heading { display: block; font-size: .82rem; letter-spacing: .035em; }
.full-ai-translation-unavailable { margin: 8px 0 2px; color: #765b20; font-style: italic; }
.full-ai-translation-choices { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.full-ai-translation-choices label { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; cursor: pointer; }
.full-ai-translation-choices input { margin: 0; }


/* Real byte-based upload progress for each photograph. */
.photo-upload-progress {
    display: none;
    flex: 1 0 100%;
    width: 100%;
    margin-top: 4px;
}
.photo-upload-progress.is-visible {
    display: block;
}
.photo-upload-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 6px;
    background: #e5e5e5;
    border: 1px solid #c8c8c8;
}
.photo-upload-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
    transition: width 120ms linear;
}
.photo-upload-progress-label {
    display: block;
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 14px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.photo-input-row.is-uploading .photo-filename {
    display: block;
    flex: 1 0 100%;
    width: 100%;
    text-align: center;
}


/* Optional non-Roman script translation preference on the Full AI upload card. */
.arkivist-translation-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 18px;
    padding: 12px;
    border: 1px solid var(--color-border, #d5d5d5);
    border-radius: 7px;
    text-align: left;
    cursor: pointer;
}
.arkivist-translation-option input { flex: 0 0 auto; margin-top: 3px; }
.arkivist-translation-option span { display: flex; flex-direction: column; gap: 5px; }
.arkivist-translation-option small { color: var(--color-muted, #666); line-height: 1.45; }
.full-ai-language-block { margin-top: 9px; }
.full-ai-language-heading { display: block; font-size: .82rem; letter-spacing: .035em; }
.full-ai-translation-unavailable { margin: 8px 0 2px; color: #765b20; font-style: italic; }
.full-ai-translation-choices { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.full-ai-translation-choices label { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; cursor: pointer; }
.full-ai-translation-choices input { margin: 0; }


/* --------------------------------------------------------------------------
   FULL AI - FOUR-STAGE PROGRESS AND SUGGESTION REVEAL
   The bar advances only when the application reaches a real workflow milestone.
   -------------------------------------------------------------------------- */
.full-ai-progress-wrap {
    margin: 18px 0 22px;
    opacity: 1;
    transition: opacity 500ms ease;
}
.full-ai-progress-wrap.is-fading {
    opacity: 0;
    pointer-events: none;
}
.full-ai-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #252525;
}
.full-ai-progress-fill {
    width: 25%;
    height: 100%;
    border-radius: inherit;
    background: #16a34a;
    transition: width 420ms cubic-bezier(.2,.75,.25,1);
}
.arkivist-ai-progress-message {
    margin: 0 0 12px;
    color: #159b20;
    text-align: left;
    font-size: clamp(17px, 2.6vw, 25px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .01em;
}
.arkivist-ai-progress-message {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
}

.full-ai-progress-percent {
    flex: 0 0 auto;
    white-space: nowrap;
}

.full-ai-progress-message-text {
    min-width: 0;
    opacity: 1;
    transition: opacity 250ms ease;
}

.full-ai-progress-message-text.is-message-fading {
    opacity: 0;
}
.full-ai-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.full-ai-progress-row .full-ai-progress-track {
    flex: 1 1 auto;
    min-width: 0;
}
.full-ai-cancel-button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}
.full-ai-results.is-preparing .full-ai-suggestion {
    opacity: 0;
    transform: translateY(14px);
}
.full-ai-results.is-revealing .full-ai-suggestion {
    animation: arkivistSuggestionReveal 520ms cubic-bezier(.2,.75,.25,1) both;
    animation-delay: calc(var(--suggestion-index, 0) * 90ms);
}
@keyframes arkivistSuggestionReveal {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .full-ai-progress-fill,
    .full-ai-progress-wrap,
    .arkivist-ai-progress-message { transition: none; }
    .full-ai-results.is-revealing .full-ai-suggestion {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.full-ai-progress-wrap.is-error .full-ai-progress-track { display: none; }

/* Dedicated search page controls */
@media(max-width:520px){.search-results-actions,.search-return-form{width:100%}.search-return-form .btn{width:100%}}

/* Custom clear control: local-only, no form submission. */
.search-field .search-clear-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #dc3545;
    cursor: pointer;
    font-size: 23px;
    line-height: 1;
}
.search-field .search-clear-button:hover { color: #b82030; }
.search-field .search-clear-button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 50%;
}
.search-field .search-clear-button[hidden] { display: none; }


/* Upload page: make the preselected item category the clear focal point. */
.upload-category-context {
    text-align: center;
    padding: 24px 16px 22px;
    margin: 0 0 22px;
    border: 1px solid #d8d8d8;
    background: #fafafa;
}
.upload-category-heading {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: #666;
    margin-bottom: 5px;
}
.upload-category-name {
    font-size: clamp(1.5rem, 3vw, 2.15rem);
    line-height: 1.2;
    font-weight: 800;
    color: #718900;
    margin-bottom: 12px;
}
.upload-category-context p { margin: 3px 0; font-size: .95rem; color: #666; }
.upload-category-context a { color: #718900; font-weight: 700; text-decoration: underline; }
.collection-add.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }


/* Full AI production review: prominent translation action bar and optional diagnostics. */
.full-ai-translation-toggle {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 7px 12px;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .2px;
    line-height: 1.2;
    text-align: right;
    cursor: pointer;
}

.full-ai-translation-toggle.is-showing-english {
    background: #579515;
}

.full-ai-translation-toggle.is-showing-original {
    background: #000000;
}

.full-ai-translation-toggle i {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
}

.full-ai-translation-toggle span {
    display: inline-block;
}

.full-ai-translation-toggle:focus-visible {
    outline: 2px solid #087fae;
    outline-offset: 2px;
}

.full-ai-details-field { margin-top: 4px; }
.full-ai-details-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 0;
    border-radius: 0;
    background: #c2c2c2;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    text-align: left;
    cursor: pointer;
}
.full-ai-details-toggle:hover,
.full-ai-details-toggle:focus,
.full-ai-details-toggle:active {
    background: #c2c2c2;
    color: #ffffff;
    box-shadow: none;
    outline-offset: 2px;
}
.full-ai-details-toggle[hidden] { display: none; }
.full-ai-details-chevron { font-size: 11px; }
.full-ai-details-toggle[aria-expanded="true"] .full-ai-details-chevron { transform: rotate(180deg); }
.full-ai-details-content {
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    border: 2px solid #c2c2c2;
    border-top: 0;
    background: #ffffff;
    color: #555555;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    user-select: text;
}
.full-ai-details-content[hidden] { display: none; }
.full-ai-detail-section + .full-ai-detail-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
}
.full-ai-detail-section h3 {
    margin: 0 0 6px;
    color: #6d8300;
    font-size: 13px;
    letter-spacing: .03em;
}
.full-ai-detail-line { margin: 3px 0; overflow-wrap: anywhere; }
.full-ai-detail-line strong { color: #555555; }


/* --------------------------------------------------------------------------
   Database-driven category picker (collection toolbar)
   -------------------------------------------------------------------------- */
.ark-category-picker {
    position: relative;
    width: 100%;
    z-index: 30;
}
.ark-category-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 41px;
    padding: 10px 14px;
    border: 1px solid #bdbdbd;
    border-radius: var(--radius-medium);
    background: #fff;
    color: var(--color-primary);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.ark-category-trigger:focus-visible,
.ark-category-main-choice:focus-visible,
.ark-category-sub-choice:focus-visible {
    outline: 2px solid rgba(113, 137, 0, .45);
    outline-offset: 2px;
}
.ark-category-trigger-value { font-weight: 700; }
.ark-category-trigger-arrow { color: var(--ark-green, #718900); margin-left: 12px; }
.ark-category-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 300px;
    max-height: min(70vh, 620px);
    overflow-y: auto;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
    z-index: 1000;
}
.ark-category-menu[hidden],
.ark-category-sub-list[hidden] { display: none !important; }
.ark-category-main-list,
.ark-category-sub-list { list-style: none; margin: 0; padding: 5px 0; }
.ark-category-main-item { margin: 0; padding: 0; }
.ark-category-main-choice {
    display: flex; align-items: center; width: 100%; min-height: 40px;
    padding: 8px 12px; border: 0; background: transparent;
    color: #333; font: inherit; font-size: 14px; font-weight: 700;
    text-align: left; cursor: pointer;
}
.ark-category-main-choice:hover,
.ark-category-main-item.is-active > .ark-category-main-choice {
    background: #f4f5f1; color: #5c7000;
}
.ark-category-main-icon {
    width: 24px; margin-right: 9px; color: #718900;
    text-align: center; font-size: 16px;
}
.ark-category-main-name { flex: 1; }
.ark-category-main-arrow { margin-left: 12px; color: #718900; font-size: 13px; }
.ark-category-sub-list {
    margin: 0 10px 8px 43px; padding: 3px 0 4px;
    border-left: 2px solid #718900; background: #fafbf7;
}
.ark-category-sub-choice {
    display: block; width: 100%; padding: 8px 14px; border: 0;
    background: transparent; color: #333; font: inherit;
    font-size: 14px; text-align: left; cursor: pointer;
}
.ark-category-sub-choice:hover { background: #f4f5f1; color: #5c7000; }
@media (max-width: 600px) {
    .ark-category-menu { min-width: 0; max-height: 58vh; }
    .ark-category-main-choice { min-height: 42px; }
}


/* Center photo upload controls, with the filename/status on its own line. */
.photo-input-row {
    justify-content: center;
    align-items: center;
}

.photo-input-row .photo-filename {
    display: block;
    flex: 1 0 100%;
    width: 100%;
    text-align: center;
}

.photo-input-row.is-uploading .photo-filename {
    text-align: center;
}

@media (max-width: 700px) {
    .photo-input-row {
        align-items: center;
    }
}


/* Header account area: desktop avatar above links; compact screens stack below brand. */
.topbar-inner {
    align-items: center;
}
.topbar-user-nav {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 9px;
    align-self: center;
    margin-left: auto;
    padding: 0;
    border: 0;
}
.topbar-avatar-wrap {
    flex: 0 0 90px;
    width: 90px;
    height: 90px;
}
.topbar-avatar {
    width: 90px;
    height: 90px;
}
.topbar-user-details {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 18px;
}

/* At tablet/mobile widths, give the brand and account links separate rows. */
@media (max-width: 700px) {
    .topbar-inner {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
    }
    .brand {
        align-self: flex-start;
        max-width: 100%;
    }
    .topbar-user-nav {
        width: 100%;
        flex: 0 0 auto;
        align-items: flex-end;
        justify-content: flex-start;
        margin: 0;
        gap: 0;
    }
    .topbar-avatar-wrap {
        display: none;
    }
    .topbar-user-details {
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        gap: 8px 16px;
        font-size: 13px;
        line-height: 1.2;
        white-space: normal;
    }
    .topbar-greeting,
    .topbar-account-link {
        display: inline-flex;
        align-items: center;
        line-height: 1.2;
        vertical-align: middle;
    }
}
@media (max-width: 420px) {
    .topbar {
        padding: 14px 16px;
    }
    .topbar-user-details {
        justify-content: flex-start;
        gap: 7px 13px;
        font-size: 12px;
    }
}

/* --------------------------------------------------------------------------
   10. PUBLIC ROOT PAGE
   The public landing page follows the shared site design. Keep its content
   blocks reusable and limit homepage-only styling to the root_index_* classes.
   -------------------------------------------------------------------------- */
.root_index_welcome {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 0 36px;
    text-align: center;
}

.root_index_welcome h1 {
    margin: 0 0 22px;
    padding: 10px;
    color: #000;
    font: 900 clamp(27px, 5vw, 50px)/1.15 'Lato', sans-serif;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
}

.root_index_welcome p {
    margin: 0 0 18px;
    text-align: left;
    line-height: 1.5;
}

.root_index_welcome .signoff {
    margin-top: 28px;
}

.root_index_welcome a {
    color: var(--color-primary);
}

/* Reserved for the future full-width homepage video showcase. */
.root_index_video {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 36px;
}

.root_index_video video,
.root_index_video iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

@media (max-width: 700px) {
    .root_index_welcome {
        padding-top: 4px;
    }

    .root_index_welcome h1 {
        margin-bottom: 18px;
    }
}

/* --------------------------------------------------------------------------
   11. PUBLIC LOGIN SYSTEM
   Shared modal styling for the public homepage and future public-facing pages.
   -------------------------------------------------------------------------- */
/* Homepage login dialog */
        .ark-login-backdrop {
            position: fixed;
            inset: 0;
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 24px;
            opacity: 0;
            pointer-events: none;
            background: rgba(0, 0, 0, 0);
            -webkit-backdrop-filter: blur(0);
            backdrop-filter: blur(0);
            transition: opacity .4s ease, background-color .4s ease,
                        -webkit-backdrop-filter .4s ease, backdrop-filter .4s ease;
        }
        .ark-login-backdrop.is-visible {
            display: flex;
        }
        .ark-login-backdrop.is-open {
            opacity: 1;
            pointer-events: auto;
            background: rgba(0, 0, 0, .66);
            -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
        }
        .ark-login-dialog {
            position: relative;
            opacity: 0;
            transform: translateY(10px) scale(.985);
            transition: opacity .4s ease, transform .4s ease;
            width: min(100%, 440px);
            padding: 34px 38px 36px;
            border: 1px solid rgba(0,0,0,.08);
            border-radius: 14px;
            background: #fff;
            box-shadow: 0 24px 80px rgba(0,0,0,.28);
            color: #202124;
            text-align: left;
        }
        .ark-login-backdrop.is-open .ark-login-dialog {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
        @media (prefers-reduced-motion: reduce) {
            .ark-login-backdrop,
            .ark-login-dialog {
                transition: none;
            }
        }
        .ark-login-close {
            position: absolute;
            top: 13px;
            right: 15px;
            width: 34px;
            height: 34px;
            border: 0;
            border-radius: 50%;
            background: transparent;
            color: #777;
            font: 28px/1 Arial, sans-serif;
            cursor: pointer;
        }
        .ark-login-close:hover { background: #f1f1f1; color: #222; }
        .ark-login-brand { display: flex; justify-content: center; margin: 0 auto 12px; }
        .ark-login-brand img { display: block; width: 150px; height: 150px; object-fit: contain; }
        .ark-login-dialog h2 {
            margin: 0 0 9px;
            color: #202124;
            font: 900 27px/1.2 'Lato', sans-serif;
            text-align: center;
            letter-spacing: -.4px;
        }
        .ark-login-intro {
            margin: 0 0 25px;
            color: #777;
            font: 15px/1.45 'Lato', sans-serif;
            text-align: center;
        }
        .ark-login-field { margin: 0 0 18px; }
        .ark-login-field label {
            display: block;
            margin: 0 0 7px;
            color: #333;
            font: 700 13px/1.3 'Oxygen', sans-serif;
        }
        .ark-login-field input {
            display: block;
            width: 100%;
            min-height: 48px;
            padding: 12px 14px;
            border: 1px solid #d6d9de;
            border-radius: 7px;
            outline: none;
            background: #fff;
            color: #202124;
            font: 15px 'Lato', sans-serif;
            transition: border-color .15s, box-shadow .15s;
        }
        .ark-login-field input:focus {
            border-color: #579515;
            box-shadow: 0 0 0 3px rgba(87,149,21,.15);
        }
        .ark-login-forgot-row { display: flex; justify-content: flex-end; margin: -7px 0 21px; }
        .ark-login-forgot-row a { color: #579515; font: 13px 'Oxygen', sans-serif; text-decoration: none; }
        .ark-login-forgot-row a:hover { text-decoration: underline; }
        .ark-login-submit {
            display: block;
            width: 100%;
            min-height: 49px;
            border: 0;
            border-radius: 7px;
            background: #579515;
            color: #fff;
            font: 700 15px 'Oxygen', sans-serif;
            cursor: pointer;
            transition: background .15s, transform .15s;
        }
        .ark-login-submit:hover { background: #477d10; }
        .ark-login-submit:active { transform: translateY(1px); }
        .ark-login-error {
            margin: 0 0 18px;
            padding: 11px 12px;
            border: 1px solid #e4a3a3;
            border-radius: 6px;
            background: #fff2f2;
            color: #9b1c1c;
            font: 13px/1.45 'Lato', sans-serif;
        }
        @media (max-width: 520px) {
            .ark-login-backdrop { padding: 14px; }
            .ark-login-dialog { padding: 28px 23px 27px; }
            .ark-login-brand img { width: 125px; height: 125px; }
            .ark-login-dialog h2 { font-size: 24px; }
        }

/* --------------------------------------------------------------------------
   12. SHARED SITE HEADER AND USER MENU
   -------------------------------------------------------------------------- */
	.ark-header {
        position: relative;
        width: 100%;
        background: #000;
        color: #fff;
        font-family: 'Lato', sans-serif;
    }
    .ark-header-inner {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        width: min(100% - 40px, 960px);
        min-height: 120px;
        margin: 0 auto;
    }
    .ark-header-logo {
        display: block;
        flex: 0 0 auto;
        width: 320px;
        height: 120px;
    }
    .ark-header-logo picture,
    .ark-header-logo img {
        display: block;
        width: 320px;
        height: 120px;
    }
    .ark-header-logo img { object-fit: contain; }
    .ark-login-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 0 16px;
        border: 1px solid #b7b7b7;
        border-radius: 3px;
        background: transparent;
        color: #fff;
        font: 700 16px/1 'Lato', sans-serif;
        letter-spacing: .04em;
        text-transform: uppercase;
        cursor: pointer;
    }
    .ark-login-button:hover { background: rgba(255,255,255,.09); }

    .ark-header-divider { display: none; }
    .ark-profile-wrap { position: relative; z-index: 9999; margin-left: auto; }
    .ark-profile-trigger {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        padding: 8px 2px 8px 8px;
        border: 0;
        background: transparent;
        color: #fff;
        font: 700 20px/1.2 'Lato', sans-serif;
        cursor: pointer;
        text-shadow: 0 1px 1px rgba(0,0,0,.3);
		text-transform: uppercase;
    }
    .ark-profile-trigger:focus-visible,
    .ark-profile-menu a:focus-visible { outline: 2px solid #000; outline-offset: 4px; }
    .ark-profile-avatar {
        display: block;
        flex: 0 0 70px;
        width: 70px;
        height: 70px;
        overflow: hidden;
        border-radius: 50%;
        background: #333;
        object-fit: cover;
    }
    .ark-profile-name { white-space: nowrap; }
    .ark-profile-chevron {
        margin-left: 2px;
        color: #fff;
        font-size: 16px;
        transition: transform .22s ease;
    }
    .ark-profile-trigger[aria-expanded="true"] .ark-profile-chevron { transform: rotate(180deg); }

    .ark-profile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 9998;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        background: rgba(0,0,0,.66);
        -webkit-backdrop-filter: blur(0);
        backdrop-filter: blur(0);
        transition: opacity .28s ease, visibility .28s ease, -webkit-backdrop-filter .28s ease, backdrop-filter .28s ease;
    }
    .ark-profile-backdrop.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }
    .ark-profile-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 1001;
        width: 224px;
        padding: 8px 0;
        border: 1px solid rgba(0,0,0,.14);
        border-radius: 5px;
        background: rgb(231, 231, 231);
        box-shadow: 0 12px 30px rgba(0,0,0,.32);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px) scale(.98);
        transform-origin: top right;
    }
    .ark-profile-menu.is-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        animation: ark-user-menu-bounce .38s cubic-bezier(.2,.85,.25,1.2) both;
    }
    @keyframes ark-user-menu-bounce {
        0% { transform: translateY(-9px) scale(.97); }
        65% { transform: translateY(2px) scale(1.01); }
        100% { transform: translateY(0) scale(1); }
    }
    .ark-profile-menu a {
        display: flex;
        align-items: center;
        gap: 13px;
        min-height: 45px;
        padding: 0 17px;
        color: #579515;
        font: 700 14px/1.2 'Lato', sans-serif;
        letter-spacing: .025em;
        text-decoration: none;
        text-transform: uppercase;
        white-space: nowrap;
	border-bottom: 1px solid #d4d4d4;
    }
    .ark-profile-menu .ark-profile-menu a i {
        width: 19px;
        font-size: 16px;
        text-align: center;
    }
    .ark-profile-menu a:hover { background: rgba(255,255,255,.35); }
    .ark-profile-menu a.ark-profile-logout { color: #e00000; }
    .ark-profile-menu a[aria-disabled="true"] { cursor: default; }
    .ark-profile-menu a[aria-disabled="true"]:hover { background: transparent; }

    @media (max-width: 700px) {
        .ark-header { padding: 0 14px 12px; }
        .ark-header-inner {
            width: 100%;
            min-height: 0;
            flex-direction: column;
            justify-content: flex-start;
            gap: 0;
        }
        .ark-header-logo {
            width: 320px;
            max-width: 100%;
            height: auto;
            margin: 0 auto;
        }
        .ark-header-logo picture,
        .ark-header-logo img {
            width: 100%;
            height: auto;
            aspect-ratio: 320 / 120;
        }
        .ark-header-divider {
            display: block;
            width: 100%;
            height: 1px;
            margin: 3px 0 9px;
            background: #777;
        }
        .ark-profile-wrap { margin: 0 auto; }
        .ark-profile-trigger { justify-content: center; padding: 4px 8px; }
        .ark-profile-avatar { flex-basis: 50px; width: 50px; height: 50px; }
        .ark-profile-menu { right: 50%; transform-origin: top center; translate: 50% 0; }
        .ark-profile-menu.is-open { animation-name: ark-user-menu-bounce-mobile; }
        @keyframes ark-user-menu-bounce-mobile {
            0% { transform: translateY(-9px) scale(.97); }
            65% { transform: translateY(2px) scale(1.01); }
            100% { transform: translateY(0) scale(1); }
        }
    }
    @media (prefers-reduced-motion: reduce) {
        .ark-profile-backdrop, .ark-profile-chevron { transition: none; }
        .ark-profile-menu.is-open { animation: none; }
    }

	/* Targets the Font Awesome icon inside the pulldown menu link */
	.ark-profile-menu a i {
	  display: inline-block;
	  transition: transform 0.5s ease;
	}

	/* Spins only the Font Awesome icon when hovering anywhere on the <a> tag */
	/*a:hover .fa-gear .fa-power-off {
	  transform: rotate(360deg);
	}*/

	/* Better animation for the shopping cart */
	@keyframes ark-user-menu-icon-bounce {
	  0%, 100% { transform: translateY(0); }
	  40% { transform: translateY(-5px); }
	  70% { transform: translateY(-2px); }
	}

	.ark-profile-menu a:hover .fa-table-list {
	  animation: ark-user-menu-icon-bounce 0.45s ease;
	}

	.ark-profile-menu a:hover .fa-gear {
	  transform: rotate(360deg);
	}

	/* Better animation for the payment */
	.ark-profile-menu a:hover .fa-cart-shopping {
	  animation: ark-user-menu-icon-bounce 0.45s ease;
	}

	.ark-profile-menu a:hover .fa-power-off {
	  transform: rotate(360deg);
	}

/* --------------------------------------------------------------------------
   13. SHARED SITE FOOTER
   -------------------------------------------------------------------------- */

    .ark-site-footer {
        width: 100%;
        background: #000;
        color: #a9a9a9;
    }
    .ark-footer-inner {
        display: flex;
        align-items: flex-start;
        width: min(100%, 960px);
        min-height: 216px;
        margin: 0 auto;
        padding: 8px 0;
    }
    .ark-footer-logo {
        flex: 0 0 350px;
        width: 350px;
        height: 200px;
        background: url('/gr/footer_logo_200px.png') no-repeat left center #000;
    }
    .ark-footer-copy {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px;
        color: #a9a9a9;
        text-align: left;
        font: 14px/1.4 'Lato', sans-serif;
    }
    .ark-footer-copy p { margin: 0 0 14px; }
    .ark-footer-copy .ark-footer-small { font-size: 11px; }
    .ark-footer-copy a { color: lightgreen; text-decoration: none; }
    .ark-footer-copy a:hover { color: #fff; }

    @media (max-width: 700px) {
        .ark-footer-inner {
            width: min(100% - 24px, 560px);
            flex-direction: column;
            align-items: center;
            padding: 8px 0 22px;
        }
        .ark-footer-logo {
            flex: 0 0 auto;
            width: 300px;
            max-width: 100%;
            height: 200px;
            background-position: center;
        }
        .ark-footer-copy {
            width: 100%;
            padding: 8px 4px;
            text-align: center;
        }
        .ark-footer-copy p { text-align: center; }
    }
    @media (max-width: 360px) {
        .ark-footer-logo { width: 100%; }
    }
