:root {
    --bg: #FBF9F5;
    --bg-subtle: #F3EFE6;
    --surface: #FFF;
    --surface-hover: #FCFBF9;
    --text: #18181B;
    --text-secondary: #52525B;
    --muted: #8A867E;
    --accent: #0F5243;
    --accent-light: rgba(15, 82, 67, .08);
    --accent-warm: #C86D28;
    --border: #E5E0D5;
    --border-hover: #0F5243;
    --highlight: rgba(200, 109, 40, .22);
    --shadow-sm: 0 2px 6px rgba(24, 24, 27, .03);
    --shadow-md: 0 14px 30px -10px rgba(24, 24, 27, .08);
    --shadow-lg: 0 22px 44px -12px rgba(15, 82, 67, .14);
    --radius: 16px
}

[data-theme="dark"] {
    --bg: #0E100F;
    --bg-subtle: #161918;
    --surface: #151817;
    --surface-hover: #1C201E;
    --text: #F4F1EA;
    --text-secondary: #A3A8A5;
    --muted: #69706C;
    --accent: #34D399;
    --accent-light: rgba(52, 211, 153, .1);
    --accent-warm: #F59E0B;
    --border: #252A28;
    --border-hover: #34D399;
    --highlight: rgba(245, 158, 11, .28);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-md: 0 14px 30px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 22px 44px -12px rgba(0, 0, 0, .7)
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

[hidden] {
    display: none !important
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 15% 5%, var(--accent-light), transparent 35%), radial-gradient(circle at 85% 15%, rgba(200, 109, 40, .06), transparent 35%);
    pointer-events: none;
    z-index: -1
}

svg.i {
    width: 17px;
    height: 17px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round
}

.navbar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 28px 0;
    display: flex;
    justify-content: space-between;
    align-items: center
}
.navbar a{
    color: inherit;
    text-decoration: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--text-secondary)
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light)
}

.theme-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font: 500 13px 'Plus Jakarta Sans', sans-serif;
    cursor: pointer
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--text)
}

.hero {
    max-width: 860px;
    margin: 0 auto;
    padding: 44px 24px 28px;
    text-align: center
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 99px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 18px
}

.hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    font-size: clamp(36px, 5.5vw, 56px);
    line-height: 1.08;
    letter-spacing: -.025em;
    margin-bottom: 14px
}

.hero h1 em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent)
}

.sub {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto
}

.search-wrap {
    position: relative;
    max-width: 640px;
    margin: 32px auto 0
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md)
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-md)
}

.search-box .lead {
    margin-left: 20px;
    width: 20px;
    height: 20px;
    color: var(--accent)
}

.search-box input {
    width: 100%;
    height: 58px;
    padding: 0 90px 0 14px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: 500 16px 'Plus Jakarta Sans', sans-serif;
    outline: none
}

.search-box input::placeholder {
    color: var(--muted)
}

.search-box kbd {
    position: absolute;
    right: 18px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 8px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font: 500 12px 'JetBrains Mono', monospace;
    pointer-events: none
}

.search-box button {
    position: absolute;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    display: grid;
    place-items: center
}

.search-box button:hover {
    background: var(--accent);
    color: #fff
}

.filters-bar {
    max-width: 1240px;
    margin: 24px auto 0;
    padding: 0 28px
}

.chips-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 12px;
    -webkit-overflow-scrolling: touch
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font: 500 13px 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none
}

.chip:hover {
    border-color: var(--accent);
    color: var(--text)
}

.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff
}

[data-theme="dark"] .chip.active {
    color: #091510;
    font-weight: 600
}

.chip-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    opacity: .75;
    padding: 1px 6px;
    border-radius: 99px;
    background: rgba(125, 125, 125, .14)
}

.toolbar {
    max-width: 1240px;
    margin: 10px auto 16px;
    padding: 12px 28px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border)
}

.count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-secondary)
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px
}

.select-sort {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font: 500 13px 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    outline: none
}

.view-toggle {
    display: flex;
    background: var(--bg-subtle);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border)
}

.view-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 32px;
    height: 28px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    cursor: pointer
}

.view-btn.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--shadow-sm)
}

.active-filter {
    max-width: 1240px;
    margin: 0 auto 14px;
    padding: 0 28px;
    display: flex
}

.active-filter-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 14px;
    border-radius: 99px;
    background: var(--surface);
    border: 1px solid var(--accent);
    box-shadow: var(--shadow-sm);
    font-size: 13px
}

.active-filter-inner strong {
    color: var(--accent)
}

.active-filter-inner a {
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 12px
}

[data-theme="dark"] .active-filter-inner a {
    color: #091510
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 28px 88px
}

.grid {
    display: grid;
    grid-template-columns:repeat(auto-fill, minmax(310px, 1fr));
    gap: 20px
}

.grid.list-view {
    grid-template-columns:1fr;
    gap: 10px
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    content-visibility: auto;
    contain-intrinsic-size: 180px;
    transition: transform .22s, box-shadow .22s, border-color .22s
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-warm));
    opacity: 0
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg)
}

.card:hover::before {
    opacity: 1
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px
}

.esp {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bg-subtle);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none
}

.esp:hover {
    text-decoration: underline
}

.card-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    opacity: .7
}

.titulo {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.28
}

.titulo a {
    color: inherit;
    text-decoration: none
}

.titulo a:hover {
    color: var(--accent)
}

.card-foot {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

.autor {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 0;
    text-decoration: none
}

.autor:hover {
    color: var(--accent)
}

.autor-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0
}

.autor-nome {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.action-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    text-decoration: none
}

.card:hover .action-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateX(3px)
}

[data-theme="dark"] .card:hover .action-circle {
    color: #091510
}

.grid.list-view .card {
    flex-direction: row;
    align-items: center;
    padding: 15px 22px;
    gap: 20px;
    contain-intrinsic-size: 68px
}

.grid.list-view .card-top {
    order: 2;
    flex-shrink: 0
}

.grid.list-view .card-index {
    display: none
}

.grid.list-view .titulo {
    order: 1;
    font-size: 18px;
    flex: 1
}

.grid.list-view .card-foot {
    order: 3;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    flex-shrink: 0;
    min-width: 210px;
    justify-content: flex-end
}

mark {
    background: var(--highlight);
    color: inherit;
    padding: 0 2px;
    border-radius: 4px
}

.sentinel {
    height: 40px;
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted)
}

.empty {
    text-align: center;
    padding: 72px 20px;
    max-width: 440px;
    margin: 20px auto;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary)
}

.empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--accent-warm);
    display: grid;
    place-items: center
}

.empty strong {
    display: block;
    margin-bottom: 8px;
    font: 600 21px 'Fraunces', Georgia, serif;
    color: var(--text)
}



@media (max-width: 720px) {
    .navbar, .filters-bar, .toolbar, .container, .active-filter {
        padding-left: 16px;
        padding-right: 16px
    }

    .grid.list-view .card {
        flex-direction: column;
        align-items: flex-start
    }

    .grid.list-view .card-foot {
        width: 100%;
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px dashed var(--border)
    }
}
   