/* Variables */
:root {
    --red: #ee1b24;
    --red-dark: #b91c1c;
    --red-light: #fee2e2;
    --green: #16a34a;
    --green-light: #dcfce7;
    --grey: #6b7280;
    --grey-light: #f3f4f6;
    --bg: #fff;
    --bg-alt: #fafaf8;
    --text: #111;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --accent: #dd0000;
    --accent-dark: #b91c1c;
    --font-heading: "Instrument Serif", Georgia, serif;
    --font-body: "DM Mono", "Menlo", monospace;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    scrollbar-width: none;
}
html::-webkit-scrollbar {
    display: none;
}
body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}
a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
em {
    font-family: var(--font-heading);
    font-style: italic;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
}
.title {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* Layout */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 clamp(24px, 7vw, 120px);
}
.container--narrow {
    padding: clamp(16px, 4vw, 48px);
}

.page {
    min-height: 100vh;
    background: var(--bg-alt);
}
.page__header {
    margin-bottom: 32px;
}
.page__title {
    font-size: 24px;
}
.page__subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.page__back {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}
.page__back:hover {
    color: var(--text);
}

.section {
    padding: 32px 0;
}
.section + .section {
    border-top: 1px solid var(--border);
}
.section--md {
    padding: 48px 0;
}
.section--lg {
    padding: 64px 0;
}
.section--alt {
    background: var(--bg-alt);
}
.section__header {
    margin-bottom: 24px;
}
.section__title {
    font-size: 36px;
    margin-bottom: 8px;
}
.section__desc {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 480px;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}
.hero__content {
    position: relative;
    z-index: 1;
}
.hero__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.hero__title {
    font-size: clamp(44px, 7vw, 96px);
    line-height: 1.05;
    margin-bottom: 20px;
}
.hero__title em {
    position: relative;
    background: linear-gradient(135deg, #000 0%, #dd0000 40%, #ff0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-left: 0.1em;
}
.hero__title em::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(
        circle,
        rgba(221, 0, 0, 0.15) 0%,
        transparent 60%
    );
    pointer-events: none;
    z-index: -1;
}
.hero__sub {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 32px;
}
.hero__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

/* Buttons */
.btn {
    font-family: var(--font-body);
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn--primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    padding: 16px 32px;
    border-radius: 999px;
    font-weight: 500;
    text-decoration: none;
}
.btn--primary:hover {
    background: var(--accent-dark);
    text-decoration: none;
}
.btn--group {
    display: flex;
    gap: 4px;
}
.btn--group .btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
}
.btn--group .btn:hover {
    border-color: var(--text);
    color: var(--text);
}
.btn--group .btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    border-radius: 999px;
    padding: 2px 10px;
}
.badge--dot {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
}
.badge--agree {
    background: var(--green-light);
    color: var(--green);
}
.badge--neutral {
    background: var(--grey-light);
    color: var(--grey);
}
.badge--disagree {
    background: var(--red-light);
    color: var(--red-dark);
}

/* Pill & Dot */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.pill .dot {
    width: 8px;
    height: 8px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Bar */
.bar {
    flex: 1;
    height: 6px;
    background: var(--grey-light);
    border-radius: 3px;
    overflow: hidden;
}
.bar__fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Grid */
.grid {
    display: grid;
    gap: 16px;
}
.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}
.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 768px) {
    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid--2 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .grid--3 {
        grid-template-columns: 1fr;
    }
}

/* Card */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: box-shadow 0.15s;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.card--link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.card--link:hover {
    text-decoration: none;
}
.card--link:hover .card__title {
    color: var(--accent);
}
.card__title {
    font-size: 20px;
    margin-bottom: 4px;
    transition: color 0.15s;
}
.card__subtitle {
    font-size: 13px;
    color: var(--text-muted);
}
.card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    align-content: flex-start;
}

/* Model Card */
.model-card__name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}
.model-card__parties {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.model-card__row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.model-card__index {
    color: var(--text-muted);
    min-width: 20px;
    font-variant-numeric: tabular-nums;
}
.model-card__name-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.model-card__pct {
    width: 45px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Answer Card */
.answer-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.answer-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.answer-card__name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    font-size: 13px;
}
.answer-card__text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Filter */
.filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}
@media (max-width: 768px) {
    .filter {
        justify-content: center;
    }
}
.filter__select {
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--font-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    min-width: 140px;
}
.filter__select:focus {
    outline: none;
    border-color: var(--accent);
}
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.filter-pills__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-family: var(--font-body);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.filter-pills__btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}
.filter-pills__btn.active {
    color: var(--text);
    background: var(--grey-light);
}

/* Stats */
.stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Table */
.table-wrapper {
    overflow: auto;
    max-height: 70vh;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th {
    text-align: left;
    padding: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}
.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.table tbody tr:hover {
    background: var(--grey-light);
}
.table tbody tr:last-child td {
    border-bottom: none;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.15s ease;
}
.modal__content {
    background: #fff;
    border-radius: 16px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 52px 24px 24px;
    position: relative;
    width: 100%;
}
.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.modal__close:hover {
    background: var(--grey-light);
    color: var(--text);
}
.modal--closing {
    animation: fadeOut 0.15s ease forwards;
}

/* Thesis */
.thesis__block {
    background: var(--grey-light);
    padding: 16px;
    border-radius: 8px;
}
.thesis__label {
    font-weight: 500;
    margin-bottom: 8px;
}
.thesis__text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}
.thesis__section {
    padding: 32px 0;
}
.thesis__section:first-child {
    padding-top: 0;
}
.thesis__section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}
.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}
.footer__links {
    display: flex;
    align-items: center;
    gap: 0;
}
.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.footer__links a:hover {
    color: var(--text);
}

/* Prompt */
.prompt-block {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}
.prompt-box {
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-up-0 {
    animation: fadeUp 0.6s ease both;
}
.animate-fade-up-1 {
    animation: fadeUp 0.6s ease 0.1s both;
}
.animate-fade-up-2 {
    animation: fadeUp 0.6s ease 0.2s both;
}
.animate-fade-up-3 {
    animation: fadeUp 0.6s ease 0.3s both;
}
.animate-fade-up-4 {
    animation: fadeUp 0.6s ease 0.4s both;
}

/* Utilities */
.text-center {
    text-align: center;
}
.text-muted {
    color: var(--text-muted);
}
.mb-24 {
    margin-bottom: 24px;
}
.separator {
    color: var(--text-muted);
    opacity: 0.4;
    margin: 0 6px;
}
