:root {
    --ink: #1d2724;
    --muted: #6d7872;
    --paper: #f2f0e9;
    --card: #fbfaf6;
    --line: #d9ddd4;
    --lime: #c9ee58;
    --lime-dark: #486511;
    --orange: #e88942;
    --shadow: 0 16px 35px rgba(31, 44, 32, .07)
}

* {
    box-sizing: border-box
}

html {
    background: var(--paper)
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Manrope, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .16;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
    z-index: 5
}

.shell {
    max-width: 1260px;
    margin: auto;
    padding: 26px 20px 28px
}

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: 22px
}

.brand {
    display: flex;
    gap: 11px;
    align-items: center;
    color: var(--ink);
    text-decoration: none
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--ink);
    color: var(--lime);
    font-weight: 800;
    font-size: 20px;
    transform: rotate(-5deg)
}

.brand strong {
    display: block;
    font-size: 15px;
    line-height: 1
}

.brand small,
.eyebrow,
.filter-label,
footer,
.status,
.meta {
    font-family: 'DM Mono', monospace;
    letter-spacing: .06em
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    margin-top: 5px
}

.sync {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font: 10px 'DM Mono', monospace;
    text-transform: uppercase
}

.sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange)
}

.sync.is-ready .sync-dot {
    background: #71ae3c;
    box-shadow: 0 0 0 4px rgba(113, 174, 60, .14)
}

.intro {
    padding: 58px 0 38px
}

.eyebrow {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    margin: 0 0 19px
}

.eyebrow span {
    color: var(--lime-dark);
    padding: 0 8px
}

h1 {
    font-size: clamp(3.9rem, 11vw, 7.8rem);
    line-height: .88;
    letter-spacing: -.09em;
    margin: 0;
    font-weight: 800
}

h1 em {
    font-style: normal;
    color: var(--lime-dark)
}

.lead {
    color: var(--muted);
    font-size: 16px;
    margin: 26px 0 0
}

.controls {
    background: var(--ink);
    border-radius: 18px;
    padding: 17px;
    box-shadow: var(--shadow)
}

.search-wrap {
    height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #303c36;
    border: 1px solid #48554d;
    border-radius: 10px;
    padding: 0 15px;
    color: #bbc4bc
}

.search-icon {
    font-size: 27px;
    line-height: 0;
    transform: rotate(-20deg)
}

.search-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    font: 14px Manrope, sans-serif
}

.search-wrap input::placeholder {
    color: #9da8a0
}

.search-wrap kbd {
    font: 12px 'DM Mono', monospace;
    border: 1px solid #647168;
    border-radius: 4px;
    padding: 2px 6px;
    color: #aeb9b0
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 17px
}

.filter-label {
    color: #95a098;
    text-transform: uppercase;
    font-size: 9px;
    display: block;
    margin-bottom: 8px
}

.chips {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.chip {
    border: 1px solid #536058;
    background: transparent;
    color: #d3dbd3;
    border-radius: 99px;
    padding: 9px 13px;
    min-height: 38px;
    font: 11px 'DM Mono', monospace;
    cursor: pointer;
    transition: .2s ease
}

.chip:hover {
    border-color: var(--lime);
    color: var(--lime)
}

.chip.is-active {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
    font-weight: 500
}

.inventory {
    padding: 47px 0 0
}

.results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
    margin-bottom: 15px
}

.results-head h2 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin: 0
}

.results-head p {
    font: 11px 'DM Mono', monospace;
    color: var(--muted);
    margin: 0
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px
}

.tool-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 19px;
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: rise .35s both
}

.card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px
}

.tool-name {
    font-size: 18px;
    line-height: 1.15;
    letter-spacing: -.035em;
    margin: 0;
    font-weight: 800
}

.meta {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 6px
}

.type-badge {
    height: max-content;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 4px 7px;
    font: 9px 'DM Mono', monospace;
    color: var(--muted);
    white-space: nowrap
}

.card-bottom {
    margin-top: 18px
}

.status {
    font-size: 10px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px
}

.status:before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #71ae3c
}

.status.loaned {
    color: #a5541e
}

.status.loaned:before {
    background: var(--orange)
}

.borrower {
    font-weight: 800;
    color: var(--ink);
    font-size: 14px;
    margin-top: 3px
}

.note {
    color: var(--muted);
    font-size: 12px;
    margin: 10px 0 0;
    border-top: 1px solid var(--line);
    padding-top: 9px
}

.empty-state,
.error-state {
    text-align: center;
    padding: 56px 20px;
    color: var(--muted)
}

.empty-icon {
    font-size: 36px;
    color: var(--lime-dark)
}

.empty-state h3,
.error-state h3 {
    color: var(--ink);
    margin: 8px 0 2px
}

.empty-state p,
.error-state p {
    margin: 0;
    font-size: 13px
}

.error-state {
    background: #fff4ed;
    border: 1px solid #f0c3a5;
    border-radius: 13px
}

.error-state h3 {
    color: #9b4c1c
}

.error-state code {
    font-family: 'DM Mono', monospace
}

footer {
    display: flex;
    justify-content: space-between;
    color: #8c9790;
    font-size: 9px;
    border-top: 1px solid var(--line);
    margin-top: 55px;
    padding-top: 17px
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@media (min-width:650px) {
    .shell {
        padding: 32px 40px 34px
    }

    .intro {
        padding: 75px 0 52px
    }

    .filter-row {
        flex-direction: row;
        justify-content: space-between;
        gap: 20px
    }

    .status-group {
        text-align: right
    }

    .status-group .chips {
        justify-content: flex-end
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (min-width:960px) {
    .shell {
        padding-left: 64px;
        padding-right: 64px
    }

    .intro {
        display: flex;
        align-items: end;
        justify-content: space-between
    }

    .lead {
        margin: 0 12% 7px 0
    }

    .tool-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .tool-card {
        min-height: 190px
    }

    .controls {
        padding: 20px 22px
    }

    .search-wrap {
        max-width: 620px
    }

    .filter-row {
        align-items: center
    }

    .filter-group {
        display: flex;
        align-items: center;
        gap: 12px
    }

    .filter-label {
        margin: 0
    }

    .chips {
        flex-wrap: nowrap
    }
}