/* =========================
   1. BASE
========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #222222;
    background-color: #ffffff;
    margin: 0em auto;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================
   2. VARIABLES
========================= */

:root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #475569;
    --disabled: #738282;
    --line: rgba(15, 23, 42, 0.08);
    --primary: #283618;
    --accent: #588157;
    --light-green: #AFE1AF;
    --pink: #D70040;
    --green: #00A740;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    --strong-shadow: 1px 1px 0px rgba(15, 23, 42, 1);
    --radius: 22px;
    --container: 1280px;
    --blog-container: 600px;
    --nav-height: 2.9rem;
    --breadcrumb-bar-height: 2rem;
    --sticky-header-height: calc(var(--nav-height) + var(--breadcrumb-bar-height));

    --layout-side-padding-min: 1rem;
    --nav-mobile-font-size: calc(1.5rem + 1vw);
    --nav-mobile-font-weight: 700;
    --card-title-font-weight: 550;

}

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

img {
    max-width: 100%;
    display: block;
}

/* =========================
   3. LAYOUT
========================= */

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.container-mid {
    max-width: 800px;
}

main {
    width: 100%
}

/* =========================
   NAVIGATION
========================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 248, 251, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.nav {
    display: flex;
    height: var(--nav-height);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nav .logo-wrapper img {
    height: calc(var(--nav-height) - 1rem);
}

.nav .nav-content {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    z-index: 110;
    display: none;

    height: calc(100vh - var(--nav-height));
    width: calc(100vw);
    overflow-y: auto;

    margin: 0;
    border-left: 1px solid var(--muted);
    box-shadow: var(--shadow);
}

.nav .nav-backdrop {
    flex: 1;
    background-color: rgb(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nav.open .nav-content {
    display: flex;
    flex-direction: row;
}

.nav.open .nav-backdrop {
    opacity: 0.8;
}

.nav .nav-list {
    flex: 3;
    padding: 0.8rem;
    margin: 0;
    background-color: var(--bg);
}

.nav .nav-toggle {
    font-size: 1.3rem;
    cursor: pointer;
}

.nav .nav-close-toggle {
    display: flex;
    flex-direction: row-reverse;
    margin-bottom: 1rem;
}

.nav .nav-list li {
    list-style: none;
}

.nav .nav-list li a {
    text-decoration: none;
    margin: 0;
    color: var(--text);
    font-size: var(--nav-mobile-font-size);
    font-weight: var(--nav-mobile-font-weight);
}

.nav .nav-list li.active a {
    font-weight: 700;
    color: var(--accent);
}

@media (min-width: 1000px) {
    .nav .nav-content {
        display: block;
        position: unset;

        height: auto;
        width: auto;
        margin: 0;
        border-left: none;
        box-shadow: none;
    }

    .nav .nav-backdrop {
        display: none;
    }

    .nav .nav-list {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 1em;
        align-content: center;
        align-items: center;
        margin: 0;
        margin-left: auto;
        padding: 0;
        position: unset;
        background-color: initial;
        width: auto;
        height: auto;
    }

    .nav .nav-list li {
        padding: .8em 1em;
        list-style-type: none;
    }

    .nav .nav-list li a {
        margin: 0;
        color: var(--muted);
        font-size: 0.95rem;
        font-weight: initial;
    }

    .nav .nav-list li a:hover {
        color: var(--text);
    }

    .nav .nav-toggle {
        display: none;
    }
}

/* =========================
   CARD
========================= */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

@media (min-width: 700px) {
    .cards {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.card p {
    margin: 0;
    color: var(--muted);
}

/* =========================
   TABLE
========================= */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 1rem 0 3rem 0;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    width: 100%;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: .4em;
}

thead tr {
    background: var(--muted);
    color: var(--surface-soft);
    border: inherit;
}

tbody tr:nth-child(odd) {
    background: var(--bg)
}

table td,
table th {
    padding: .4em .8em;
}

table td {
    border-top: 1px solid var(--line);
}

table th {
    border-top: none;
    text-align: left;
}

table.indexed th:first-child {
    text-align: right
}

table thead tr:first-child th:first-child {
    border-top-left-radius: .4em;
}

table thead tr:first-child th:last-child {
    border-top-right-radius: .4em;
}

table tbody tr:last-child td:first-child {
    border-bottom-left-radius: .4em;
}

table tbody tr:last-child td:last-child {
    border-bottom-right-radius: .4em;
}

/* =========================
   BORDERED-CONTAINER
========================= */
.bordered-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84));
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1rem 3rem;
    margin: 4rem 0;
    width: min(var(--container), calc(100% - 2rem));
}

/* =========================
   FOOTER
========================= */

.site-footer {
    margin-top: 4rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.06));
    border-top: 1px solid var(--line);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-logo-link {
    display: inline-block;
    width: max-content;
}

.footer-logo {
    height: 48px;
    width: auto;
    display: block;
}

.footer-tagline {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 28ch;
    line-height: 1.4;
}

.footer-col-title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid var(--line);
}

.footer-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-legal a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-legal a:hover {
    color: var(--text);
}

@media (min-width: 700px) {
    .site-footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 3rem;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* =========================
   FORM
========================= */

form {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
}

form h1,
form h2,
form h3 {
    margin: .4rem 0;
}

form fieldset {
    border: 1px solid var(--line);
    border-radius: .8rem;
    background-color: var(--bg);
}

form.bordered {
    border: 1px solid var(--line);
    border-radius: .4em;
    padding: .8em 1.6em;
}

form.inline {
    margin-bottom: 0;
}

form button,
.btn {
    display: inline-block;
    font-size: 1em;
    font-weight: normal;
    padding: .4em .8em;
    margin: .2em .4em .2em 0;
    border: 1px solid var(--line);
    border-radius: .4em;
    color: var(--text);
    background: var(--surface-soft);
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
}

.btn,
.btn:link,
.btn:visited,
.btn:hover,
.btn:active {
    color: var(--text);
    text-decoration: none;
}

.btn.disabled:hover {
    color: inherit;
    transform: none;
    border: 1px solid var(--surface-soft);
    cursor: not-allowed;
    pointer-events: none;
}

form button.dark,
.btn.dark,
form button[type=submit] {
    color: var(--surface-soft);
    background: var(--muted);
    border-color: var(--line);
}

.btn.green {
    color: var(--surface-soft);
    background: var(--accent);
    border-color: var(--line);
}

.btn .btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-secondary,
.btn-outline {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    color: var(--text);
}

button:hover,
.btn:hover {
    transform: none;
}

form select:disabled,
button:disabled,
input:disabled,
a.disabled,
form button[type=submit]:disabled {
    text-decoration: none;
    background-color: var(--surface-soft);
    border-color: var(--surface-soft);
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.7;
}

form.inline button {
    overflow: hidden;
    border: none;
    margin: 0;
}

.form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 700px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-wrapper {
    display: flex;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
}

label {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: .4rem;
}

form input[type=text],
form input[type=password],
form input[type=email],
form input[type=number],
form select,
form input[type=file],
form textarea {
    display: block;
    width: calc(100% - 2rem - 2px);
    box-sizing: border-box;
    font-size: 1em;
    padding: .4em .8em;
    border: 1px solid var(--line);
    border-radius: .4em;
}

form .EasyMDEContainer {
    width: calc(100% - 2rem - 2px);
}

form .EasyMDEContainer>div {
    border-color: var(--line);
}

form input[type=checkbox] {
    display: block;
    font-size: 2em;
    padding: .4em .8em;
    margin: .4em 0 .8em 0;
}

form textarea {
    font-family: sans-serif;
    font-size: .95rem;
}

form input[type=text].error,
form input[type=password].error {
    margin-bottom: .2em;
    border-color: red;
}

form input[readonly] {
    color: var(--muted);
}

form.delete-image button {
    font-size: .8em;
    font-weight: normal;
    padding: .3em .6em;
    border: 2px solid #EE1111;
    border-radius: .4em;
    color: #FFFFFF;
    background-color: #EE4444;
}

form a.btn.disabled {
    background-color: #eee;
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.7;
}

form select option:disabled {
    color: var(--disabled);
    cursor: not-allowed;
}

form span.error {
    display: block;
    font-size: .9em;
    color: red;
    margin-bottom: .8em;
}

form span.alert {
    display: block;
    color: red;
    margin: 0 .8em;
    text-align: center;
}

/* =========================
   HORIZONTAL FILTER
========================= */

.horizontal-filter {
    position: sticky;
    top: var(--sticky-header-height);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    width: 100%;
    margin-bottom: 2em;
    padding: .4rem 0;
    background-color: transparent;
}

.horizontal-filter .toggle-mobile {
    display: block;
    margin-left: 1rem;
}

.horizontal-filter .filter-title {
    position: relative;
    z-index: 30;
}

.horizontal-filter .eyebrow {
    cursor: pointer;
}

.horizontal-filter .filter-backdrop {
    position: fixed;
    top: var(--sticky-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.horizontal-filter.form-open .filter-backdrop {
    opacity: 1;
    visibility: visible;
}

.horizontal-filter .form-wrapper {
    margin-left: 0;
}

.form-wrapper form {
    display: none;
    justify-content: flex-start;
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--sticky-header-height) - 4rem);
    overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid var(--line);
    border-radius: .4rem;
    padding: .8rem 1.6rem;
}

.form-wrapper form.is-open {
    display: block;
}

/* Mobile-first: each filter group is a tappable collapsible header */
.filter-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    width: 100%;
    justify-content: space-between;
    padding: 0.6em 0;
    cursor: pointer;
}

.filter-group-label {
    display: inline-block;
    margin-left: 1rem;
}

.filter-group::after {
    content: "";
    height: 0.42em;
    border-right: 2px solid currentColor;
    width: 0.42em;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transform-origin: center;
    flex: 0 0 auto;
    margin-top: -3px;
    margin-right: 1rem;
}

.filter-group.active {
    border-color: #888;
}

.filter-group.active::after {
    transform: rotate(-135deg) translateY(-1px);
    margin-top: 2px;
}

.form-wrapper form .filter-container {
    width: 100%;
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    max-width: 900px;
    padding: 0.4em 0.9em;
    background-color: #fff;
    border: 1px solid #aaa;
    border-radius: 0.45em;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    z-index: 30;
}

.form-wrapper form .filter-container.is-open {
    width: 100%;
    display: block;
}

.form-wrapper form .filter-container.is-open.wrap {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    position: unset;
    border: none;
    box-shadow: none;
    padding-bottom: 0.6em;
}

.form-wrapper form .filter-item {
    display: flex;
    align-items: center;
    gap: 0.45em;
    margin-top: 0.45em;
    margin: .5em .5em 0 0;
}

.filter-item input[type="checkbox"],
.filter-item label {
    margin: 0;
    padding: 0;
    font-weight: normal;
    font-size: 0.9em;
}

/* Free-text search input (mobile-first: full width) */
.filter-search {
    margin-bottom: .6em;
}

.filter-search-input {
    width: 100%;
    padding: 0.45em 0.8em;
    border: 1px solid var(--line);
    border-radius: 0.45em;
    font: inherit;
}

@media(min-width: 1000px) {
    .filter-search {
        margin-bottom: 0;
    }

    .filter-search-input {
        width: auto;
    }

    .horizontal-filter {
        position: unset;
        display: flex;
        align-items: center;
        gap: 1em;
        width: 100%;
        margin-bottom: 1em;
        padding: 0;
    }

    .horizontal-filter .toggle-mobile {
        display: none;
    }

    .horizontal-filter .eyebrow {
        cursor: default;
    }

    .horizontal-filter .filter-backdrop {
        display: none;
    }

    .horizontal-filter .form-wrapper {
        margin-left: auto;
    }

    .form-wrapper form {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: unset;
        gap: .4em;
        margin: 0;
        padding: 0;
        border: none;
        max-height: none;
        overflow-y: visible;
    }

    .form-wrapper .menu-toggle {
        display: none;
    }

    .form-wrapper form .filter-dropdown {
        position: relative;
    }

    .filter-group,
    .filter-submit,
    .filter-reset {
        min-height: 1.6em;
        padding: 0.45em 0.8em;
        border: 1px solid #e5e7eb;
        border-radius: 0.45em;
        background: #fff;
        color: #111827;
        font: inherit;
        text-decoration: none;
        cursor: pointer;
        pointer-events: auto;
    }

    /* Reset the mobile collapsible-header back to an inline button */
    .filter-group {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        width: auto;
        justify-content: normal;
    }

    /* Drop the mobile indents; caret + active styles inherit from base */
    .filter-group-label {
        margin-left: 0;
    }

    .filter-group::after {
        margin-right: 0;
    }

    .form-wrapper form .filter-container {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        min-width: 220px;
        max-width: 320px;
        padding: 0.4em 0.9em;
        background-color: #fff;
        border: 1px solid var(--line);
        border-radius: 0.45em;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
        z-index: 30;
    }

    .form-wrapper form .filter-item {
        display: flex;
        align-items: center;
        gap: 0.45em;
        margin-top: 0.45em;
    }

    .form-wrapper form .filter-item:first-child {
        margin-top: 0;
    }

    .filter-item input[type="checkbox"],
    .filter-item label {
        margin: 0;
        padding: 0;
        font-weight: normal;
        font-size: 0.9em;
    }

    .filter-submit:hover,
    .filter-reset:hover,
    .filter-group:hover {
        border-color: #cbd5e1;
    }
}


/* =========================
   BREADCRUMB BAR
========================= */
.breadcrumb-bar {
    height: var(--breadcrumb-bar-height);
    display: flex;
    column-gap: 1rem;
    max-width: 100vw;
    text-wrap: nowrap;
    border-top: 1px solid var(--line);
}

.site-header .breadcrumb-bar {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.breadcrumb-bar .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    height: 100%;
    border: none;
    border-right: 1px solid var(--line);
}

.breadcrumb-bar .sidebar-toggle button {
    align-items: center;
    border: none;
    height: 100%;
    width: 100%;
    display: inline-flex;
    background-color: var(--bg);
    cursor: pointer;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    margin: 0 auto 0 0;
    min-width: 0;
    padding: 2px;
    unicode-bidi: isolate;
    list-style: none;
    overflow-x: auto;
    scrollbar-color: #0000 #0000;
}

.breadcrumbs li {
    display: flex;
    place-items: center;
}

.breadcrumbs li span.active {
    font-weight: 500;
}

:is(.breadcrumbs li):not(:last-child):after {
    background-color: var(--muted);
    content: "";
    height: 1.25rem;
    margin-inline: .25rem;
    -webkit-mask-image: url(/images/assets/chevron-right.svg);
    mask-image: url(/images/assets/chevron-right.svg);
    -webkit-mask-size: cover;
    mask-size: cover;
    vertical-align: middle;
    width: 1.25rem;
}

/* =========================
   SIDEBAR
========================= */

.left-sidebar {
    position: fixed;
    top: var(--sticky-header-height);
    z-index: 90;
    display: none;

    height: calc(100vh - var(--sticky-header-height));
    width: calc(100vw);
    overflow-y: auto;
    padding: 0;
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.left-sidebar.open {
    display: flex;
}

.left-sidebar .sidebar-content {
    flex: 2;
    background: var(--bg);
}

.left-sidebar .sidebar-content .menu-list {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.left-sidebar .sidebar-backdrop {
    flex: 1;
    background-color: rgb(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.left-sidebar.open .sidebar-backdrop {
    opacity: 0.8;
}

.left-sidebar.open .sidebar-content .menu-list li {
    display: flex;
    justify-content: space-between;
    padding: .8em 1em;
    list-style-type: none;
}

.left-sidebar .sidebar-content .menu-list li a {
    text-decoration: none;
    margin: 0;
    color: var(--text);
    font-size: var(--nav-mobile-font-size);
    font-weight: var(--nav-mobile-font-weight);
}

.left-sidebar .sidebar-content .menu-list li a:hover {
    color: var(--text);
}

.left-sidebar .sidebar-content .menu-list li.active a {
    font-weight: 700;
    color: var(--accent);
}

@media(min-width: 1000px) {
    .left-sidebar {
        display: none;
        position: unset;
        width: 260px;
        background: var(--bg);
    }

    .left-sidebar.open {
        display: block;
        position: sticky;
    }

    .left-sidebar .sidebar-backdrop {
        display: none;
    }

    .left-sidebar .sidebar-content {
        overflow-y: auto;
    }

    .left-sidebar.open .sidebar-content .menu-list li {
        display: flex;
        justify-content: space-between;
        padding: .8em 1em;
        list-style-type: none;
    }

    .left-sidebar.open .sidebar-content .menu-list li a {
        margin: 0;
        color: var(--text);
        font-size: 1.2rem;
        font-weight: 700;
    }

    .left-sidebar.open .sidebar-content .menu-list li a:hover {
        color: var(--text);
    }

    .left-sidebar.open .sidebar-content .menu-list li.active a {
        font-weight: 600;
        color: var(--accent);
    }
}

/* =========================
   PAGER
========================= */

.pager {
    display: flex;
}

.pager nav {
    display: flex;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: .4rem;
    padding: 0;
    margin: 1em auto;
}

.pager nav a {
    border-left: 1px solid var(--line);
    text-decoration: none;
    padding: .4em .8em;
    cursor: pointer;
}

.pager nav a.selected {
    pointer-events: none;
    cursor: default;
    color: var(--surface);
    background-color: var(--muted);
    font-weight: bold;
}

.pager nav a:first-child {
    border-left: none;
}

.pager nav a:last-child {
    padding-right: .8em;
}

.pager nav a.disabled {
    opacity: 0.5;
    pointer-events: none;
    background-color: initial;
}

.pager nav a.pager-ellipsis {
    opacity: 0.7;
}

.live-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.live-dot.inactive {
    background: #D70040;
    box-shadow: 0 0 0 5px rgba(215, 0, 64, 0.12);
}

/* =========================
   NOT YET CATEGORIZED, MAYBE NOT NEEDED
========================= */


.sidebar form {
    margin: 0;
    padding: 0;
}

.sidebar form .filter-name {
    font-size: small;
    font-weight: bold;
    padding: .4em .8em;
    margin: 0;
    background-color: #eeeeee;
}

.sidebar-filter form {
    width: 100%;
    margin: 0;
    border: none;
    padding: 1em;
}

.sidebar-filter .filter-group {
    cursor: default;
    list-style: none;
}

.sidebar-filter .filter-container {
    padding: .4em .2em;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-filter button,
.sidebar-filter a.btn {
    font-size: small;
}

.sidebar-filter .filter-item {
    display: flex;
    gap: .6em;
    padding: .1em 0;
}

form.horizontal {
    padding: .4em 1.6em;
}

form.horizontal select {
    display: inline-block;
    width: 15em;
    margin: .4em;
    max-width: 30em;
    text-overflow: ellipsis;
}

a,
a:visited {
    color: #0055aa;
}

a:hover {
    color: #002288;
}

#image-linker-pager-wrapper.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

div.login {
    width: 20em;
    margin: 10em auto 0 auto;
}

ul.navigation {
    padding: 0;
    margin: 0 1em 1em 0;
}

ul.navigation li {
    padding: .4em .8em;
    list-style-type: none;
}

ul.navigation li.active {
    background-color: #0055ff;
    border-radius: .4em;
}

ul.navigation a {
    text-decoration: none;
}

ul.navigation a:nth-child(even) {
    float: right;
}

ul.navigation li.active a {
    color: #ffffff;
}


h3 {
    margin: .8em 0em .4em 0;
}

.category_level_0 {
    font-weight: 600;
}

.category_level_1 {
    font-weight: 500;
}

.department-container {
    margin: 2em 0;
}

.container.error {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

img.error {
    max-width: 100%;
    object-fit: cover;
}

/* =========================
   FLASH
========================= */

.flash-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--surface-soft);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: 0.4rem;
    padding: 0.7rem 1.2rem;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.flash-container.flash-hidden {
    opacity: 0;
    pointer-events: none;
}

.flash-container span {
    font-weight: bold;
    font-size: 0.9rem;
}

.flash-container span.success {
    color: var(--green);
}

.flash-container span.error {
    color: var(--pink);
}

.flash-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    padding: 0;
    color: inherit;
    opacity: 0.5;
    flex-shrink: 0;
}

.flash-close:hover {
    opacity: 1;
}

/* =========================
   PHOTO VIEWER
========================= */


@media(min-width: 1000px) {
    .product-photo-viewer {
        position: -webkit-sticky;
        position: sticky;
        top: calc(var(--sticky-header-height));
        align-self: start;
    }
}

#photo-viewer {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 600px;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

#photo-viewer.is-loading:after {
    content: "";
    width: 30px;
    height: 30px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: url("images/assets/load.gif") center / contain no-repeat;
    pointer-events: none;
}

#photo-viewer img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnail-placeholder {
    border: 2px;
    margin: 5px;
    background-color: #f0f0f0;
}

/* =========================
   EYE BROW
========================= */
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    margin: .4em 0;
    border-radius: 999px;
    background: #dad7cd;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
}

/* =========================
   TOOLTIP
========================= */
.tooltip {
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    width: 8rem;
    position: absolute;
    bottom: 115%;
    left: 50%;
    margin-left: -6rem;
    z-index: 40;
    background: var(--muted);
    font-size: .7rem;
    border-radius: .2rem;
    border: solid 1px var(--line);
    padding: .4rem .8rem;
    color: var(--surface);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 75%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--muted) transparent transparent transparent;
}

.tooltip:hover .tooltip-text,
.tooltip:focus .tooltip-text,
.tooltip:focus-within .tooltip-text {
    visibility: visible;
}

.tooltip-help {
    display: inline-block;
    cursor: help;
    margin-left: .4rem;
    vertical-align: middle;
}

.tooltip-help .tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--surface);
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.tooltip-text-wide {
    width: 18rem;
    margin-left: -9rem;
    text-align: left;
    font-size: .8rem;
}

.tooltip-text-wide ul {
    margin: .4rem 0 0 0;
    padding-left: 1.1rem;
}

.tooltip-text-wide li {
    margin: .15rem 0;
}

/* =========================
   REGION LIST
========================= */
.card-footer {
    display: flex;
    flex-direction: column;
    align-items: start;
    width: 100%;
    background-color: var(--surface-soft);
    flex-grow: 1;
    padding: .8rem 1.6rem 1.6rem;
}

.card-footer .ul-wrapper {
    display: flex;
    width: 100%;
    justify-content: start;
    align-items: start;
}

.card-footer p {
    font-size: .8rem;
    margin-bottom: .2rem;
    color: var(--muted)
}

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
    align-items: start;
    justify-content: start;
    margin: 0;
    padding: 0;
}

.tag-list li {
    font-size: .8rem;
    border: 1px solid var(--line);
    background-color: var(--accent);
    padding: .2rem .4rem;
    border-radius: .2rem;
    color: var(--surface);
}


/* =========================
   TAB PANELS
========================= */
.tab-list-wrapper {
    position: sticky;
    top: var(--sticky-header-height);
    z-index: 30;
    border-bottom: 1px solid var(--line);
    padding-top: 2rem;
    background-color: var(--surface);
}

.tab-list {
    display: flex;
    gap: .4rem;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
    display: none;
}

.tab-control {
    flex: 0 0 auto;
    white-space: nowrap;
    background-color: var(--surface-soft);
    padding: .8rem 1.6rem;
    border-radius: .4rem .4rem 0 0;
    border: 1px solid var(--line);
    cursor: pointer;
}

.tab-control a {
    color: var(--text);
}

.tab-control.active {
    background-color: var(--muted);
}

.tab-control.active a {
    color: var(--surface);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* =========================
   GALLERY
========================= */

.gallery-toggle {
    cursor: pointer;
}

.gallery {
    display: none;
    position: fixed;
    top: var(--sticky-header-height);
    left: 0;
    height: calc(100vh - var(--sticky-header-height));
    width: calc(100vw);
    margin: 0 auto;
}

.gallery.active {
    display: block;
}

.gallery .gallery-close {
    position: fixed;
    top: calc(var(--sticky-header-height) + 1rem);
    right: 1rem;
    cursor: pointer;
    z-index: 80;
}

.gallery .gallery-close img {
    width: clamp(2rem, 6vw, 3.5rem);
    color: var(--text);
}

.gallery .image-wrapper {
    position: relative;
    max-height: 750px;
    background-color: var(--surface);
}

.gallery .image-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 800px;
    object-fit: contain;
    object-position: center;
}


.gallery .backdrop {
    background-color: black;
    opacity: .5;
    height: 100%;
}


.gallery .image-control {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    width: min(100px, 10vw);
    height: 100%;
    background-color: var(--muted);
    opacity: .1;
    cursor: pointer;
}

.gallery .image-control:hover {
    opacity: .4;
}

.gallery .image-control span {
    font-size: 2rem;
    color: black;
    opacity: 1;
}

.gallery .image-control.prev {
    left: 0;
}

.gallery .image-control.next {
    right: 0;
}
