/* Bansos Peka archive. Flat paper-ticket style, no gradients, no glow,
   no glassmorphism. Palette and type come from DESIGN.md: Peka yellow
   #FFD60A, ink black #17170F, paper cream #FFF6DB / #F7EFD2. */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: #FFF6DB;
    color: #17170F;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

a { color: #17170F; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: 3px solid #17170F;
    outline-offset: 2px;
}

/* Header: black bar, yellow PEKA lockup. */
.site-header { background: #17170F; color: #FFFFFF; }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}
.lockup { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; min-height: 44px; }
.lockup-peka {
    background: #FFD60A;
    color: #17170F;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 4px;
}
.lockup-bansos { color: #FFFFFF; font-weight: 800; font-size: 20px; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
}
.site-header nav a:hover { background: #2A2A1E; text-decoration: underline; }
.site-header :focus-visible { outline-color: #FFD60A; }

/* Hero: one big line, one sentence, real counts from the data. */
.hero { padding: 48px 0 24px; }
.hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 6vw, 52px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 16ch;
}
.hero-sub { font-size: 18px; margin: 0 0 16px; max-width: 62ch; }
.hero-counts { margin: 0; font-size: 17px; }
.hero-counts strong {
    background: #FFD60A;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Filter bar: real GET form, works without JavaScript. */
.filters { padding: 8px 0 24px; }
.filters form {
    background: #FFFFFF;
    border: 2px solid #17170F;
    border-radius: 12px;
    padding: 16px;
}
.filter-row {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}
.filter-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; }
.filter-field > span { font-weight: 600; font-size: 14px; }
.filter-field input,
.filter-field select {
    font: inherit;
    color: #17170F;
    background: #FFF6DB;
    border: 2px solid #17170F;
    border-radius: 8px;
    min-height: 44px;
    padding: 8px 12px;
    width: 100%;
}

/* Buttons: yellow primary, black secondary. Specific labels only. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #17170F;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.btn-dark { background: #17170F; color: #FFFFFF; }
.btn-dark:hover { background: #2A2A1E; }
.btn-claim { background: #FFD60A; color: #17170F; font-size: 18px; }
.btn-claim:hover { background: #F5C400; }
.btn-ended { background: #F7EFD2; color: #5C5A4E; cursor: default; }

/* Card grid: one rhythm, cards lift 2px with a hard shadow on hover. */
.daftar { padding: 8px 0 40px; }
.result-count { margin: 0 0 16px; font-weight: 600; }
.card-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card-grid li { min-width: 0; }
.card {
    display: block;
    height: 100%;
    background: #FFFFFF;
    border: 2px solid #17170F;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}
.card:hover, .card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 #17170F;
}
.card-cover { position: relative; border-bottom: 2px dashed #17170F; background: #F7EFD2; }
.card-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.cover-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    font-weight: 800;
    font-size: 32px;
    color: #17170F;
    background: #FFD60A;
}
/* Stamp: the ticket motif, rotated a touch on purpose. */
.stamp {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #FFD60A;
    color: #17170F;
    border: 2px solid #17170F;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.03em;
    padding: 4px 8px;
    transform: rotate(-2deg);
}
.stamp-big { font-size: 16px; padding: 6px 12px; }
.card-body { padding: 16px; }
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.card-date { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: #5C5A4E; }
.card-title { margin: 0 0 12px; font-size: 19px; line-height: 1.35; font-weight: 800; }
.card-meta { margin: 0; display: grid; gap: 6px; }
.card-meta div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.card-meta dt { font-weight: 600; font-size: 13px; color: #5C5A4E; }
.card-meta dd { margin: 0; font-size: 14px; }

/* Status labels carry text, not color alone. */
.status {
    font-size: 13px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    border: 2px solid #17170F;
    white-space: nowrap;
}
.status-open { background: #1E7B34; border-color: #1E7B34; color: #FFFFFF; }
.status-ended { background: #C0392B; border-color: #C0392B; color: #FFFFFF; }
.status-unknown { background: #FFFFFF; color: #17170F; }

/* Empty state: says why, gives the one action that fixes it. */
.empty {
    background: #FFFFFF;
    border: 2px solid #17170F;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin: 24px 0;
}
.empty h1 { margin: 0 0 8px; font-size: 28px; }
.empty p { margin: 0 0 16px; }

/* Tentang: plain text section on the darker cream, one break in rhythm. */
.tentang { background: #F7EFD2; padding: 32px 0 48px; border-top: 2px solid #17170F; }
.tentang h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.tentang p { margin: 0; max-width: 68ch; }

/* Detail page. */
.detail { padding: 24px 20px 48px; }
.back { margin: 0 0 16px; }
.back a { font-weight: 600; }
.detail-cover { position: relative; border: 2px solid #17170F; border-radius: 12px; overflow: hidden; background: #F7EFD2; }
.detail-img { display: block; width: 100%; max-height: 520px; object-fit: cover; object-position: top; }
.detail-head { margin: 24px 0; }
.detail-meta-line { margin: 0 0 8px; color: #5C5A4E; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail h1 { margin: 0 0 12px; font-size: clamp(26px, 5vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.detail-excerpt { font-size: 18px; margin: 0; max-width: 62ch; }
.detail h2 { font-size: 22px; font-weight: 800; margin: 32px 0 12px; }
.fact-box {
    margin: 0;
    background: #FFFFFF;
    border: 2px solid #17170F;
    border-radius: 12px;
    padding: 16px 20px;
    display: grid;
    gap: 10px;
}
.fact-box div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.fact-box dt { font-weight: 600; color: #5C5A4E; }
.fact-box dd { margin: 0; }
.fact-box dd code, .empty code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.catch-box {
    margin-top: 24px;
    background: #FFD60A;
    border: 2px solid #17170F;
    border-radius: 12px;
    padding: 16px 20px;
}
.catch-box h2 { margin: 0 0 8px; font-size: 18px; }
.catch-box p { margin: 0; }
.check-list, .steps-list { margin: 0; padding-left: 24px; display: grid; gap: 8px; }
.steps-list li::marker { font-weight: 800; }
.claim-row { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.claim-note { margin: 0; color: #5C5A4E; font-size: 14px; }
.shared-links ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.shared-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    background: #FFFFFF;
    border: 2px solid #17170F;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
}
.shared-links a:hover { background: #FFD60A; }

/* Footer: one line of links, no template columns. */
.site-footer { background: #17170F; color: #FFFFFF; padding: 24px 0; }
.site-footer p { margin: 0 0 8px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #FFFFFF; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer :focus-visible { outline-color: #FFD60A; }

/* Header submit button + auth links. */
.btn-nav {
    background: #FFD60A;
    color: #17170F;
    font-weight: 800;
    text-decoration: none;
    padding: 10px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
}
.btn-nav:hover { background: #F5C400; }
.logout-form { display: inline-flex; margin: 0; }
.nav-link-btn {
    font: inherit;
    font-weight: 600;
    color: #FFFFFF;
    background: none;
    border: 0;
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 8px;
    cursor: pointer;
}
.nav-link-btn:hover { background: #2A2A1E; text-decoration: underline; }

/* Hero submit action + community note. */
.hero-actions { margin: 20px 0 12px; }
.hero-community { margin: 0; font-size: 15px; color: #5C5A4E; max-width: 62ch; }

/* Community badge on cards and detail pages. */
.badge-community {
    font-size: 13px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    border: 2px solid #17170F;
    background: #FFD60A;
    color: #17170F;
    white-space: nowrap;
}
.community-by { margin: 0 0 12px; color: #5C5A4E; }
.status-pending { background: #FFD60A; border-color: #17170F; color: #17170F; }

/* Forms: register, login, submit, admin reject. */
.form-page { padding: 32px 20px 48px; }
.form-page h1 { margin: 0 0 8px; font-size: clamp(26px, 5vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.form-intro { margin: 0 0 24px; max-width: 62ch; font-size: 17px; }
.form {
    background: #FFFFFF;
    border: 2px solid #17170F;
    border-radius: 12px;
    padding: 20px;
    display: grid;
    gap: 16px;
    max-width: 640px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field > span { font-weight: 600; font-size: 14px; }
.form-field input,
.form-field select,
.form-field textarea {
    font: inherit;
    color: #17170F;
    background: #FFF6DB;
    border: 2px solid #17170F;
    border-radius: 8px;
    min-height: 44px;
    padding: 8px 12px;
    width: 100%;
}
.form-field textarea { min-height: 0; resize: vertical; }
.form-errors {
    background: #FDECEA;
    border: 2px solid #C0392B;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 0 24px;
    max-width: 640px;
}
.form-errors ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.form-alt { margin: 16px 0 0; }

/* My submissions + admin queue: ticket cards, stacked on mobile. */
.mine-list, .admin-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.mine-item, .admin-item {
    background: #FFFFFF;
    border: 2px solid #17170F;
    border-radius: 12px;
    padding: 20px;
}
.mine-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.mine-head h2 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; }
.admin-item h3 { font-size: 16px; font-weight: 800; margin: 16px 0 8px; }
.admin-note {
    background: #F7EFD2;
    border: 2px solid #17170F;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 16px 0 0;
}
.admin-actions { display: grid; gap: 16px; margin-top: 20px; border-top: 2px dashed #17170F; padding-top: 20px; }
.admin-actions form { margin: 0; }
.reject-form .form-field { margin-bottom: 12px; }

/* Mobile: one column, smaller type step, tighter padding. */
@media (max-width: 640px) {
    .hero { padding: 32px 0 16px; }
    .hero-sub { font-size: 16px; }
    .filter-row { flex-direction: column; align-items: stretch; }
    .filter-field { flex: 1 1 auto; }
    .filter-row .btn { width: 100%; }
    .card-grid { grid-template-columns: 1fr; }
    .fact-box div { grid-template-columns: 84px 1fr; }
    .claim-row .btn { width: 100%; }
}
