/* Public single-batch page (batch.php) — a PAPER page, same token language
   as archive.css/beer.css/container.css. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--paper);
    min-height: 100vh;
    color: var(--ink);
}

.batch-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

.batch-brandmark-link {
    display: block;
    margin: 0 auto 4px;
    max-width: 260px;
}

.batch-back-link {
    display: inline-block;
    color: var(--moss);
    text-decoration: none;
    font-weight: 700;
    margin: 20px 0;
}

.batch-back-link:hover {
    text-decoration: underline;
}

.batch-header {
    text-align: center;
    padding: 36px 30px;
    margin-bottom: 24px;
}

.batch-header-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.batch-no-badge-page {
    font-weight: 700;
    color: var(--moss);
}

.batch-stage-badge {
    background: var(--paper-sink);
    color: var(--ink-soft);
    font-size: 0.75em;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.batch-stage-on_tap {
    background: var(--pine-lift);
    color: var(--ink-deep);
}

.batch-stage-storing {
    background: var(--moss-lift);
    color: var(--ink-deep);
}

.batch-header h1 {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ink);
    font-size: 2.2em;
    margin-bottom: 12px;
}

.batch-style {
    color: var(--ink-soft);
    font-size: 1em;
    margin-bottom: 8px;
}

.batch-rating-summary {
    color: var(--moss);
    font-weight: 700;
}

.batch-section {
    background-color: var(--paper-lift);
    border: var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.batch-section h2 {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ink);
    font-size: 1.1em;
    margin-bottom: 12px;
}

.batch-section .hatch-rule {
    margin-bottom: 16px;
}

.batch-section p {
    color: var(--ink-soft);
    line-height: 1.6;
}

.batch-admin-only-marker {
    color: var(--ink-soft);
    font-size: 0.7em;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.batch-ready-note {
    background: var(--moss-lift);
    color: var(--ink-deep);
    font-weight: 700;
    text-align: center;
}

.batch-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.batch-spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--paper-sink);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.batch-spec-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink-soft);
    font-weight: 600;
}

.batch-spec-value {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--ink);
}

.batch-recipe-link {
    display: inline-block;
    color: var(--moss);
    text-decoration: none;
    font-weight: 700;
}

.batch-recipe-link:hover {
    text-decoration: underline;
}

.batch-timeline {
    color: var(--ink);
    font-size: 0.95em;
}

.batch-no-kegs {
    color: var(--ink-soft);
}

.batch-keg-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.batch-keg-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--paper-sink);
    border-radius: var(--radius);
    padding: 10px 14px;
}

.batch-keg-name {
    font-weight: 700;
    color: var(--ink);
}

.batch-keg-dates {
    color: var(--ink-soft);
    font-size: 0.85em;
}

.batch-bottle-count {
    color: var(--ink-soft);
}

.batch-rating-average {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
    font-size: 2em;
    font-weight: 700;
    color: var(--ink);
}

.batch-rating-count {
    color: var(--ink-soft);
    margin-bottom: 14px;
}

.batch-rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.batch-distribution-row {
    display: grid;
    grid-template-columns: 32px 1fr 30px;
    align-items: center;
    gap: 10px;
}

.batch-distribution-label {
    color: var(--ink-soft);
    font-size: 0.85em;
}

.batch-distribution-bar-track {
    display: block;
    background: var(--paper-sink);
    border-radius: var(--radius);
    height: 10px;
    overflow: hidden;
}

.batch-distribution-bar {
    display: block;
    height: 100%;
    background: var(--moss);
    border-radius: var(--radius);
}

/* Fixed-width steps rather than an inline `style="width: ...%"` — the CSP
   has no style-src 'unsafe-inline'. archive_logic.php's
   distribution_width_class() maps a rating count out of the distribution's
   own max to one of these eleven classes. */
.dist-w-0 { width: 0%; }
.dist-w-1 { width: 10%; }
.dist-w-2 { width: 20%; }
.dist-w-3 { width: 30%; }
.dist-w-4 { width: 40%; }
.dist-w-5 { width: 50%; }
.dist-w-6 { width: 60%; }
.dist-w-7 { width: 70%; }
.dist-w-8 { width: 80%; }
.dist-w-9 { width: 90%; }
.dist-w-10 { width: 100%; }

.batch-distribution-count {
    color: var(--ink-soft);
    font-size: 0.85em;
    text-align: right;
}

.batch-comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-comment-item {
    background: var(--paper-sink);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.batch-comment-hidden {
    opacity: 0.6;
}

.batch-comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.batch-comment-stars {
    color: var(--moss);
}

.batch-comment-date {
    color: var(--ink-soft);
    font-size: 0.8em;
}

.batch-comment-hidden-tag {
    background: var(--rust-lift);
    color: var(--ink-deep);
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.batch-comment-text {
    color: var(--ink);
}

.batch-admin-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.batch-admin-link {
    color: var(--moss);
    text-decoration: none;
    font-weight: 700;
}

.batch-admin-link:hover {
    text-decoration: underline;
}

.batch-status-page {
    text-align: center;
    padding: 60px 30px;
    margin-top: 40px;
}

.batch-status-page h1 {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ink);
    font-size: 1.8em;
    margin-bottom: 12px;
}

.batch-status-page p {
    color: var(--ink-soft);
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .batch-header h1 {
        font-size: 1.6em;
    }
}
