:root {
    --paper: #ebe9e2;
    --panel: #f5f3ee;
    --ink: #101010;
    --muted: #575757;
    --accent: #e4572e;
    --line: rgba(16, 16, 16, 0.065);
}

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

body {
    font-family: "Courier New", Courier, monospace;
    color: var(--ink);
    font-weight: 600;
    min-height: 100vh;
    background-color: var(--paper);
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px),
        linear-gradient(135deg, rgba(228, 87, 46, 0.03), rgba(0, 0, 0, 0));
    background-size: 52px 52px;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem;
}

header {
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 5px solid var(--ink);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

header h1 {
    font-family: "Arial Black", Impact, Haettenschweiler, sans-serif;
    font-size: clamp(2.6rem, 7vw, 4.2rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 0.9;
    font-weight: 900;
}

.highlight {
    color: var(--accent);
    text-shadow: 2px 2px 0 rgba(16, 16, 16, 0.85);
}

.tagline {
    letter-spacing: 0.03em;
    font-weight: 800;
    color: var(--muted);
    font-size: 1.02rem;
}

.header-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.action-btn {
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    font-size: 0.84rem;
    color: var(--ink);
    background: var(--panel);
    border: 3px solid var(--ink);
    padding: 0.75rem 1.1rem;
    box-shadow: 3px 3px 0 var(--ink);
}

.action-btn.solid {
    background: var(--accent);
}

.community-menu {
    position: relative;
    align-self: flex-start;
}

.community-menu summary {
    list-style: none;
    cursor: pointer;
}

.community-menu summary::-webkit-details-marker {
    display: none;
}

.community-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.55rem);
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.7rem;
    background: var(--panel);
    border: 3px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    z-index: 20;
}

.community-menu-panel a {
    display: block;
    width: 100%;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--ink);
    border: 3px solid var(--ink);
    background: #fff;
    padding: 0.6rem 0.7rem;
    box-shadow: 2px 2px 0 var(--ink);
}

.community-menu-panel a:hover,
.community-menu-panel a:focus-visible {
    background: var(--accent);
    outline: none;
}

#top-widgets {
    margin-bottom: 1.6rem;
}

.builds-columns,
.sites-grid,
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

#builds-section {
    margin-bottom: 1.6rem;
}

.build-column {
    background: var(--panel);
    border: 4px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink), 0 12px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem;
}

.build-column h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.9rem;
    font-weight: 800;
}

.build-card {
    background: #fff;
    border: 3px solid var(--ink);
    box-shadow: 2px 2px 0 var(--ink);
    padding: 0.7rem 0.75rem;
    min-height: 76px;
}

.build-card + .build-card {
    margin-top: 0.7rem;
}

.build-card p {
    font-size: 0.86rem;
    line-height: 1.35;
    margin: 0;
    font-weight: 700;
}

.build-card a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--ink);
}

.card,
#editorial {
    background: var(--panel);
    border: 4px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink), 0 12px 20px rgba(0, 0, 0, 0.08);
}

.card {
    padding: 1.2rem;
    min-height: 280px;
}

.card h2,
.section-title {
    font-size: 1.08rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 1rem;
    font-weight: 800;
}

.site-card h2 {
    margin-bottom: 0.85rem;
}

.site-card h2 a,
.site-card h2 strong {
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
}

.card p {
    font-size: 1.04rem;
    line-height: 1.45;
    margin-bottom: 0.65rem;
    font-weight: 700;
}

.card p strong {
    font-weight: 900;
}

.card a,
.read-more-btn {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 3px solid var(--ink);
}

.converter-grid {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: var(--muted);
    font-size: 0.8rem;
}

#weight-input,
#paper-type-select,
#input-unit-select {
    width: 100%;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    background: #fff;
    border: 3px solid var(--ink);
    padding: 0.6rem;
}

#card-size-select {
    width: 100%;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink);
    background: #fff;
    border: 3px solid var(--ink);
    padding: 0.7rem 0.6rem;
}

#weight-input:focus,
#paper-type-select:focus,
#input-unit-select:focus,
#card-size-select:focus {
    outline: none;
    border-color: var(--accent);
}

.converter-results {
    border-top: 4px solid var(--ink);
    padding-top: 0.9rem;
}

.dimension-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.dimension-results .value {
    font-size: clamp(1.15rem, 2.2vw, 1.75rem);
}

.dimension-results .label {
    font-size: 0.74rem;
}

.result {
    text-align: left;
}

.result .value {
    display: block;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
    font-weight: 900;
    color: var(--ink);
}

.result .label {
    display: block;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 800;
}

#editorial {
    padding: 1.2rem;
    margin-bottom: 1.6rem;
}

.editorial-card {
    text-align: left;
}

.editorial-card h2 {
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 0.55rem;
}

.editorial-card .author {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.editorial-card .summary {
    margin-bottom: 0.9rem;
    max-width: 78ch;
}

footer {
    border-top: 5px solid var(--ink);
    padding-top: 1rem;
}

footer h2 {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.community-links {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.community-links a {
    text-decoration: none;
    color: var(--ink);
    border: 3px solid var(--ink);
    background: var(--panel);
    padding: 0.55rem 0.7rem;
    box-shadow: 2px 2px 0 var(--ink);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.site-credit {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
}

.site-credit a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--ink);
    font-weight: 800;
}

.loading,
.empty-content {
    color: var(--muted);
}

.community-block + .community-block {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 3px solid var(--ink);
}

.feed-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.poll-options {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0;
}

.poll-option-btn {
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    background: #fff;
    border: 3px solid var(--ink);
    padding: 0.7rem 0.8rem;
    cursor: pointer;
}

.poll-option-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.poll-result-row + .poll-result-row {
    margin-top: 0.9rem;
}

.poll-result-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: baseline;
    font-size: 0.9rem;
}

.poll-bar {
    width: 100%;
    height: 14px;
    margin: 0.35rem 0 0.2rem;
    background: #fff;
    border: 2px solid var(--ink);
}

.poll-bar-fill {
    height: 100%;
    background: var(--accent);
}

.poll-vote-count,
.poll-total {
    font-size: 0.84rem;
    color: var(--muted);
}

@media (max-width: 1180px) {
    .builds-columns,
    .sites-grid,
    .widgets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .builds-columns,
    .sites-grid,
    .widgets-grid {
        grid-template-columns: 1fr;
    }

    .card {
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .container {
        padding: 0.9rem;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .tagline {
        font-size: 0.9rem;
        letter-spacing: 0.02em;
    }

    .community-menu-panel {
        position: static;
        margin-top: 0.55rem;
        min-width: 0;
        width: 100%;
    }

    .community-links {
        flex-direction: column;
    }
}

@media print {
    #top-widgets,
    footer,
    .header-actions {
        display: none;
    }
}
