:root {
    --bg: #101312;
    --panel: #171c1a;
    --panel-2: #20251f;
    --line: #2b332e;
    --text: #f3f7f0;
    --muted: #aab4aa;
    --accent: #6fd08c;
    --accent-2: #f0c35b;
    --danger: #e37d68;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.logo {
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

nav a {
    color: var(--muted);
    font-size: 15px;
    text-decoration: none;
}

nav a:hover,
.section-heading a:hover {
    color: var(--text);
}

main {
    padding-bottom: 64px;
}

section {
    margin-top: 42px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 36px;
    align-items: stretch;
    min-height: 420px;
    padding: 54px 0 24px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero h1 {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: .98;
}

.hero p,
.page-title p,
.detail-hero p,
.product-card p,
.brand-card p,
.beta-card p {
    color: var(--muted);
}

.hero-copy > p:not(.eyebrow) {
    max-width: 650px;
    font-size: 19px;
}

.search-box {
    display: flex;
    width: min(100%, 700px);
    margin-top: 22px;
    border: 1px solid var(--line);
    background: #0c0f0d;
}

.search-box.inline {
    margin-top: 0;
}

.search-box input,
.search-box button,
.review-form input,
.review-form select,
.review-form textarea,
.review-form button,
.button {
    min-height: 48px;
    border: 0;
    font: inherit;
}

.search-box input,
.review-form input,
.review-form select,
.review-form textarea {
    width: 100%;
    padding: 12px 14px;
    background: #0c0f0d;
    color: var(--text);
    border: 1px solid var(--line);
}

.search-box input {
    border: 0;
}

.search-box button,
.review-form button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    background: var(--accent);
    color: #0b140f;
    font-weight: 800;
    cursor: pointer;
}

.button.secondary {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
}

.hero-panel,
.beta-card,
.review-card,
.product-card,
.brand-card,
.score-grid div {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hero-panel {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 28px;
}

.metric {
    color: var(--accent-2);
    font-size: 54px;
    font-weight: 900;
    line-height: 1;
}

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.section-title {
    margin-bottom: 18px;
    font-size: 28px;
}

.section-heading,
.page-title.split {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.section-heading a {
    color: var(--accent);
    font-weight: 800;
}

.review-card {
    padding: 20px;
    margin-bottom: 16px;
}

.review-card h3 {
    margin-bottom: 8px;
}

.post-link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--accent);
    font-weight: 800;
}

.card-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 14px;
}

.rating {
    color: var(--accent);
    font-weight: 900;
}

.rating.large {
    font-size: 24px;
}

.beta-card {
    align-self: start;
    padding: 24px;
    background: var(--panel-2);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card,
.brand-card {
    color: var(--text);
    text-decoration: none;
    overflow: hidden;
    transition: transform .16s ease, border-color .16s ease;
}

.product-card:hover,
.brand-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-card span,
.brand-card small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.product-card h3,
.product-card p,
.product-card span,
.product-card .rating,
.brand-card h3,
.brand-card p,
.brand-card small,
.brand-card .rating {
    margin: 12px 16px;
}

.compact-list {
    display: grid;
    gap: 10px;
}

.compact-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.compact-list strong {
    color: var(--muted);
    text-align: right;
}

.page-title {
    display: grid;
    gap: 12px;
    padding: 28px 0 6px;
}

.page-title h1 {
    margin-bottom: 0;
    font-size: clamp(36px, 5vw, 58px);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 24px;
}

.filter-row span {
    padding: 8px 12px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 46% minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-hero img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.detail-hero h1 {
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1;
}

.meta-grid,
.score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.meta-grid span,
.score-grid div {
    display: grid;
    gap: 4px;
    padding: 16px;
}

.meta-grid strong,
.score-grid strong {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.score-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.score-grid span {
    font-size: 20px;
    font-weight: 900;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.review-form {
    display: grid;
    gap: 14px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.review-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.review-form h2 {
    margin-bottom: 4px;
}

.review-post {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

.post-card,
.comments-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.post-header span,
.muted {
    display: block;
    color: var(--muted);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #0b140f;
    font-weight: 900;
}

.avatar.small {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 14px;
}

.post-image {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    background: #0c0f0d;
}

.post-body {
    padding: 20px;
}

.post-body h1 {
    margin: 8px 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
}

.post-subject {
    color: var(--accent);
    font-weight: 900;
}

.post-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.post-meta span {
    display: grid;
    gap: 4px;
    padding: 12px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.post-meta strong {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.comments-panel {
    padding: 18px;
    position: sticky;
    top: 14px;
}

.comment-form {
    display: grid;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.comment-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.comment-form input,
.comment-form textarea,
.comment-form select {
    width: 100%;
    padding: 12px;
    background: #0c0f0d;
    color: var(--text);
    border: 1px solid var(--line);
    font: inherit;
}

.comment-form button {
    min-height: 44px;
    border: 0;
    background: var(--accent);
    color: #0b140f;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.comment-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.comment {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
}

.comment p {
    margin-bottom: 0;
}

.form-error {
    padding: 10px 12px;
    color: #220a04;
    background: var(--danger);
    border-radius: 8px;
    font-weight: 800;
}

.success-message {
    padding: 10px 12px;
    color: #0b140f;
    background: var(--accent);
    border-radius: 8px;
    font-weight: 800;
}

.profile-link {
    color: var(--text);
}

.post-gallery {
    display: grid;
    gap: 1px;
    background: #0c0f0d;
}

.post-gallery .post-image + .post-image {
    border-top: 1px solid var(--line);
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 18px 0;
    color: var(--muted);
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.action-button.danger {
    background: transparent;
    color: var(--danger);
}

.report-panel {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.moderation-row {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.auth-card {
    width: min(100%, 520px);
    margin: 54px auto 0;
}

.auth-note {
    margin-top: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 4px 9px;
    color: #101312;
    background: var(--accent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.badge.small {
    min-height: 22px;
    margin-left: 6px;
    padding: 3px 7px;
    font-size: 10px;
    vertical-align: middle;
}

.badge-admin {
    background: #e37d68;
}

.badge-elite {
    background: #f0c35b;
}

.badge-top {
    background: #8fd3ff;
}

.badge-trusted {
    background: #9ddf9c;
}

.badge-founder {
    background: #c7a3ff;
}

.badge-voice {
    background: #f3a6d7;
}

.badge-first,
.badge-member {
    background: #cfd7cf;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.leaderboard {
    display: grid;
    gap: 12px;
}

.leader-row {
    display: grid;
    grid-template-columns: 52px auto minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.leader-row h2,
.leader-row p {
    margin: 0;
}

.leader-row p {
    color: var(--muted);
}

.rank {
    color: var(--accent-2);
    font-size: 20px;
    font-weight: 900;
}

.login-prompt {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.login-prompt h3,
.login-prompt p {
    margin: 0;
}

.login-prompt p {
    color: var(--muted);
}

.triple {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 900px) {
    .site-header,
    .section-heading,
    .page-title.split {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .section-grid,
    .detail-hero,
    .form-grid,
    .review-post {
        grid-template-columns: 1fr;
    }

    .comments-panel {
        position: static;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .score-grid,
    .meta-grid,
    .leader-row,
    .moderation-row,
    .login-prompt {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leader-row .badge,
    .leader-row strong {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    nav {
        gap: 10px;
    }

    .search-box,
    .compact-list a {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box button {
        width: 100%;
    }

    .card-grid,
    .score-grid,
    .meta-grid,
    .post-meta,
    .leader-row,
    .moderation-row,
    .login-prompt,
    .triple {
        grid-template-columns: 1fr;
    }

    .leader-row .badge,
    .leader-row strong {
        grid-column: auto;
    }

    .hero {
        min-height: 0;
        padding-top: 32px;
    }
}
