Spaces:
Running
on
Zero
Running
on
Zero
/* Base Variables */ | |
:root { | |
--primary: #FF7D1E; | |
--primary-light: #FFF8F2; | |
--primary-selected: #FFE8D5; | |
--accent: #6B7280; | |
--text-dark: #333333; | |
--text-medium: #666666; | |
--border-light: #E6E6E6; | |
--background-light: #F9F9F9; | |
--background-main: #FFFFFF; | |
--highlight: #FFFBEB; | |
--model-a-color: #92B4F4; | |
--model-b-color: #F8ADA7; | |
--query-background: #F0F7FF; | |
--query-border: #D1E3F8; | |
--query-text: #2E5AAC; | |
--insufficient-alert-bg: #fff0f0; | |
--insufficient-alert-border: #f78989; | |
--insufficient-alert-text: #b92020; | |
} | |
/* Dark Mode */ | |
@media (prefers-color-scheme: dark) { | |
:root { | |
--primary: #FF9542; | |
--primary-light: #3D3026; | |
--primary-selected: #4D3927; | |
--accent: #9CA3AF; | |
--text-dark: #E6E6E6; | |
--text-medium: #BBBBBB; | |
--border-light: #444444; | |
--background-light: #2A2A2A; | |
--background-main: #1A1A1A; | |
--highlight: #3D3825; | |
--model-a-color: #5A85C7; | |
--model-b-color: #C47A74; | |
--query-background: #2A3F5C; | |
--query-border: #3A5277; | |
--query-text: #A9C2E8; | |
--insufficient-alert-bg: #3D2525; | |
--insufficient-alert-border: #913F3F; | |
--insufficient-alert-text: #FF8A8A; | |
} | |
} | |
/* Global Styles */ | |
body, .gradio-container { | |
background-color: var(--background-main); | |
font-size: 15px; | |
overflow-x: hidden ; | |
color: var(--text-dark); | |
} | |
/* Common Resets */ | |
.gradio-container { | |
padding: 0 ; | |
} | |
.gradio-column > *, .gradio-row > *, | |
.gradio-markdown, .gradio-markdown p { | |
margin-top: 0 ; | |
margin-bottom: 0 ; | |
padding-top: 0 ; | |
padding-bottom: 0 ; | |
} | |
.gradio-markdown p { | |
margin-bottom: 0.5em ; | |
} | |
.gradio-row { | |
overflow: visible ; | |
} | |
/* Tab Navigation */ | |
.tabs { | |
margin-top: 0 ; | |
} | |
.tab-nav { | |
background-color: var(--background-light) ; | |
padding: 5px 10px ; | |
border-radius: 8px 8px 0 0 ; | |
border-bottom: 1px solid var(--border-light) ; | |
} | |
.tab-nav button { | |
font-size: 1.1em ; | |
font-weight: 600 ; | |
padding: 10px 25px ; | |
margin: 0 5px ; | |
border-radius: 6px 6px 0 0 ; | |
border: none ; | |
background-color: transparent ; | |
color: var(--text-medium) ; | |
transition: all 0.3s ease ; | |
} | |
.tab-nav button.selected { | |
background-color: var(--background-main) ; | |
color: var(--primary) ; | |
border-bottom: 2px solid var(--primary) ; | |
} | |
.tab-nav button:hover:not(.selected) { | |
background-color: rgba(255, 255, 255, 0.1) ; | |
color: var(--text-dark) ; | |
} | |
.tabitem { | |
border: none ; | |
} | |
/* Common Typography */ | |
h1 { | |
font-size: 1.6em ; | |
color: var(--primary) ; | |
margin: 10px 0 5px 0 ; | |
padding: 0 ; | |
} | |
h3, | |
.section-heading { | |
font-size: 1.2em ; | |
font-weight: 600 ; | |
margin: 5px 0 2px 0 ; | |
padding: 0 ; | |
color: var(--text-dark) ; | |
} | |
.orange-title { | |
color: var(--primary) ; | |
font-weight: bold ; | |
} | |
/* Common Dividers */ | |
hr { | |
margin: 5px 0 ; | |
border: none ; | |
height: 1px ; | |
background-color: var(--border-light) ; | |
} | |
.results-reveal-area hr { | |
margin: 25px 0 20px 0 ; | |
width: 100% ; | |
} | |
/* Query Section */ | |
#query-title-row { | |
margin: 0 ; | |
display: flex ; | |
align-items: center ; | |
overflow: visible ; | |
min-height: 40px ; | |
white-space: normal ; | |
} | |
#query-title-row h3 { | |
margin: 0 ; | |
padding: 0 ; | |
line-height: 1.3 ; | |
flex-grow: 0 ; | |
flex-shrink: 0 ; | |
white-space: normal ; | |
overflow: visible ; | |
width: auto ; | |
display: inline-block ; | |
} | |
#query-container { | |
display: flex ; | |
align-items: stretch ; | |
gap: 10px ; | |
overflow: visible ; | |
} | |
.query-box-row { | |
background-color: var(--query-background) ; | |
padding: 12px 15px ; | |
border-radius: 6px ; | |
border: 1px solid var(--query-border) ; | |
margin: 0 ; | |
align-items: flex-start ; | |
flex: 1 1 70% ; | |
max-width: 70% ; | |
overflow: visible ; | |
display: flex ; | |
min-height: 50px ; | |
height: auto ; | |
} | |
.query-text { | |
padding: 0 ; | |
margin: 0 ; | |
background-color: transparent ; | |
border: none ; | |
overflow: visible ; | |
width: 100% ; | |
display: block ; | |
} | |
.query-text p { | |
font-size: 1.2em ; | |
font-weight: 600 ; | |
color: var(--query-text) ; | |
line-height: 1.4 ; | |
margin: 0 ; | |
padding: 0 ; | |
background-color: transparent ; | |
border: none ; | |
overflow-wrap: break-word ; | |
word-wrap: break-word ; | |
word-break: normal ; | |
hyphens: auto ; | |
white-space: normal ; | |
overflow: visible ; | |
} | |
/* Buttons */ | |
.query-button, | |
.context-toggle-button { | |
background-color: var(--background-light) ; | |
color: var(--text-medium) ; | |
border: 1px solid var(--border-light) ; | |
border-radius: 6px ; | |
font-weight: 500 ; | |
transition: all 0.2s ease ; | |
} | |
.query-button { | |
padding: 0 20px ; | |
flex: 0 0 auto ; | |
display: flex ; | |
align-items: center ; | |
justify-content: center ; | |
font-size: 0.95em ; | |
min-height: 50px ; | |
white-space: nowrap ; | |
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) ; | |
} | |
.context-toggle-button { | |
padding: 5px 10px ; | |
font-size: 0.85em ; | |
height: 30px ; | |
line-height: 1 ; | |
width: auto ; | |
min-width: 0 ; | |
max-width: 150px ; | |
margin: 0 ; | |
cursor: pointer ; | |
} | |
.query-button:hover, | |
.context-toggle-button:hover { | |
background-color: var(--primary-light) ; | |
color: var(--primary) ; | |
border-color: var(--primary) ; | |
} | |
/* Action Buttons */ | |
#submit-button, | |
#try-another-btn { | |
background-color: var(--primary) ; | |
color: white ; | |
padding: 12px 30px ; | |
border-radius: 6px ; | |
font-weight: 600 ; | |
font-size: 1.2em ; | |
transition: all 0.2s ease ; | |
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) ; | |
border: none ; | |
} | |
#submit-button { | |
margin-top: 15px ; | |
} | |
#try-another-btn { | |
width: 100% ; | |
max-width: 100% ; | |
margin: 10px auto ; | |
display: block ; | |
} | |
#submit-button:hover, | |
#try-another-btn:hover { | |
background-color: #E56E0F ; | |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) ; | |
} | |
.control-buttons button { | |
margin: 0 10px ; | |
font-size: 1em ; | |
border-radius: 6px ; | |
padding: 8px 16px ; | |
transition: all 0.2s ease ; | |
} | |
/* Context Section */ | |
.context-description { | |
background-color: transparent ; | |
font-style: normal ; | |
color: var(--text-medium) ; | |
font-size: 1.05em ; | |
} | |
.context-topic { | |
display: inline-flex ; | |
align-items: center ; | |
background-color: transparent ; | |
padding: 0 ; | |
border-radius: 0 ; | |
box-shadow: none ; | |
} | |
.topic-label { | |
font-weight: 600 ; | |
color: var(--text-medium) ; | |
margin-right: 6px ; | |
} | |
#context-header-row { | |
display: flex ; | |
justify-content: space-between ; | |
align-items: center ; | |
} | |
.context-title { | |
margin: 0 ; | |
padding: 0 ; | |
font-size: 1.2em ; | |
font-weight: 600 ; | |
color: var(--text-dark) ; | |
} | |
.context-items-container { | |
border-radius: 6px; | |
overflow: hidden; | |
} | |
.context-item { | |
border: 1px solid var(--border-light); | |
background-color: var(--background-light); | |
padding: 12px; | |
border-radius: 6px; | |
margin-bottom: 8px; | |
font-size: 1em; | |
line-height: 1.5; | |
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); | |
} | |
.primary-context { | |
border-left: 3px solid var(--model-a-color) ; | |
} | |
.chunk-header { | |
font-weight: 600; | |
color: var(--query-text); | |
margin-bottom: 8px; | |
padding-bottom: 5px; | |
border-bottom: 1px solid var(--query-border); | |
} | |
.highlight { | |
background-color: #FFECB3 ; | |
padding: 0.1em 0.3em ; | |
border-radius: 3px ; | |
font-weight: 600 ; | |
color: #664500 ; | |
} | |
/* Insufficient Alert */ | |
.insufficient-alert { | |
border: 2px solid var(--insufficient-alert-border); | |
background-color: var(--insufficient-alert-bg); | |
color: var(--insufficient-alert-text); | |
padding: 12px; | |
border-radius: 6px; | |
margin-bottom: 12px; | |
font-size: 1em; | |
} | |
.insufficient-alert strong { | |
display: inline-flex ; | |
align-items: center ; | |
margin-bottom: 5px; | |
font-size: 1.1em ; | |
font-weight: 600 ; | |
} | |
.insufficient-alert strong svg { | |
margin-right: 8px ; | |
width: 1em ; | |
height: 1em ; | |
} | |
.insufficient-alert p { | |
margin: 0; | |
font-size: 1em; | |
} | |
/* Summary Cards */ | |
.summary-card-wrapper { | |
height: 100% ; | |
overflow-y: auto ; | |
} | |
#summary-containers { | |
margin-top: 10px ; | |
} | |
#main-interface-area > div:nth-child(7) > div { | |
display: flex ; | |
flex-direction: row ; | |
align-items: stretch ; | |
} | |
#main-interface-area > div:nth-child(7) > div > div { | |
flex: 1 ; | |
display: flex ; | |
flex-direction: column ; | |
} | |
#main-interface-area > p:first-of-type { | |
font-size: 1em ; | |
margin: 0 0 8px 0 ; | |
padding: 0 ; | |
line-height: 1.4 ; | |
color: var(--text-medium) ; | |
} | |
.summary-card { | |
border: 1px solid var(--border-light) ; | |
border-radius: 6px ; | |
background-color: var(--background-light) ; | |
box-shadow: 0 1px 3px rgba(0,0,0,0.03) ; | |
margin: 0 ; | |
padding: 12px ; | |
display: flex ; | |
flex-direction: column ; | |
height: auto ; | |
min-height: 200px ; | |
overflow: visible ; | |
} | |
.summary-card-a { | |
border-left: 3px solid var(--model-a-color) ; | |
} | |
.summary-card-b { | |
border-left: 3px solid var(--model-b-color) ; | |
} | |
.summary-card .gr-form, | |
.summary-card .gr-form > div { | |
margin: 0 ; | |
padding: 0 ; | |
flex: 1 ; | |
display: flex ; | |
flex-direction: column ; | |
} | |
.summary-card .gr-input-label, | |
.feedback-section .gr-input-label { | |
font-size: 1.1em ; | |
font-weight: 600 ; | |
color: var(--text-dark) ; | |
} | |
.summary-card .gr-input-label { | |
margin: 0 0 5px 0 ; | |
padding: 0 ; | |
} | |
.feedback-section .gr-input-label { | |
margin-bottom: 0.6em ; | |
} | |
.summary-card .gr-textbox { | |
border: none ; | |
background: transparent ; | |
padding: 0 ; | |
margin: 0 ; | |
flex: 1 ; | |
} | |
.summary-card textarea { | |
background-color: transparent ; | |
border: none ; | |
color: var(--text-dark) ; | |
font-size: 1.1em ; | |
line-height: 1.4 ; | |
height: auto ; | |
min-height: 150px ; | |
padding: 0 ; | |
margin: 0 ; | |
width: 100% ; | |
resize: none ; | |
overflow-y: visible ; | |
} | |
/* Voting Section */ | |
.vote-button { | |
flex-grow: 1; | |
margin: 0 5px 5px 5px ; | |
font-size: 1.05em ; | |
padding: 12px 15px ; | |
border-radius: 6px ; | |
transition: all 0.2s ease ; | |
background-color: var(--background-light) ; | |
border: 1px solid var(--border-light) ; | |
min-height: 50px ; | |
font-weight: 500 ; | |
color: var(--text-dark) ; | |
} | |
.vote-button:hover:not(.vote-button-neither) { | |
background-color: var(--primary-light) ; | |
border-color: var(--primary) ; | |
color: var(--primary) ; | |
} | |
.vote-button-neither:hover { | |
background-color: var(--insufficient-alert-bg) ; | |
border-color: var(--insufficient-alert-border) ; | |
color: var(--insufficient-alert-text) ; | |
} | |
.vote-button.selected:not(.vote-button-neither) { | |
border-width: 2px ; | |
border-style: solid ; | |
border-color: var(--primary) ; | |
background-color: var(--primary-light) ; | |
color: var(--primary) ; | |
font-weight: 600 ; | |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) ; | |
} | |
.vote-button-neither.selected { | |
border-width: 2px ; | |
border-style: solid ; | |
border-color: var(--insufficient-alert-border) ; | |
background-color: var(--insufficient-alert-bg) ; | |
color: var(--insufficient-alert-text) ; | |
font-weight: 600 ; | |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) ; | |
} | |
/* Feedback Section */ | |
.feedback-section { | |
padding: 3px 0 ; | |
background-color: transparent ; | |
margin: 3px 0 ; | |
font-size: 1em; | |
border: none ; | |
box-shadow: none ; | |
} | |
.feedback-section .gr-check-radio { | |
font-size: 1.05em ; | |
} | |
.feedback-section .gr-check-radio span { | |
font-size: 1.05em ; | |
color: var(--text-dark) ; | |
} | |
.feedback-section input[type="checkbox"] { | |
width: 18px ; | |
height: 18px ; | |
margin-right: 6px ; | |
} | |
.feedback-section input[type="checkbox"]:checked { | |
accent-color: var(--primary) ; | |
border-color: var(--primary) ; | |
background-color: var(--primary) ; | |
} | |
/* Model Reveal */ | |
.model-reveal { | |
font-size: 1.1em ; | |
text-align: center ; | |
font-weight: 600 ; | |
background-color: transparent ; | |
padding: 0 ; | |
border: none ; | |
} | |
.model-reveal span { | |
font-size: 1.3em ; | |
display: flex ; | |
align-items: center ; | |
justify-content: center ; | |
width: 100% ; | |
padding: 25px 15px ; | |
min-height: 50px ; | |
} | |
.model-a-reveal span { | |
background-color: rgba(146, 180, 244, 0.2) ; | |
} | |
.model-b-reveal span { | |
background-color: rgba(248, 173, 167, 0.2) ; | |
} | |
/* DataFrames and Tables */ | |
.gr-dataframe table { | |
font-size: 0.95em ; | |
border-collapse: separate ; | |
border-spacing: 0 ; | |
overflow: hidden ; | |
} | |
.gr-dataframe th, | |
.gr-dataframe td { | |
padding: 8px 10px ; | |
border: none ; | |
border-bottom: 1px solid var(--border-light) ; | |
} | |
.gr-dataframe th { | |
background-color: var(--background-light) ; | |
color: var(--text-dark) ; | |
font-weight: 600 ; | |
} | |
.gradio-container .prose { | |
line-height: 1.4 ; | |
margin: 0 ; | |
padding: 0 ; | |
} | |
.gradio-container-5-28-0 .prose table { | |
border: none ; | |
} | |
.gradio-container-5-28-0 .prose th, | |
.gradio-container-5-28-0 .prose td { | |
border: 1px solid var(--border-light) ; | |
} | |
/* Leaderboard Styles */ | |
.model-link { | |
color: var(--text-dark) ; | |
text-decoration: none ; | |
border-bottom: 1px dotted var(--border-light) ; | |
transition: color 0.2s, border-color 0.2s ; | |
padding: 2px 0 ; | |
display: inline-flex ; | |
align-items: center ; | |
font-weight: 500 ; | |
} | |
.model-link:hover { | |
color: #FF5500 ; | |
border-color: #FF5500 ; | |
} | |
.external-icon { | |
display: inline-block ; | |
margin-left: 5px ; | |
opacity: 0.6 ; | |
transition: opacity 0.2s ; | |
} | |
.model-link:hover .external-icon { | |
opacity: 1 ; | |
} | |
#leaderboard-info { | |
margin: 15px 0 ; | |
padding: 0 ; | |
background-color: rgba(255, 236, 224, 0.5) ; | |
border: none ; | |
} | |
#leaderboard-info > div { | |
margin: 0 ; | |
padding: 15px ; | |
background-color: var(--background-light) ; | |
border: none ; | |
} | |
#leaderboard-info h3 { | |
margin-top: 0 ; | |
margin-bottom: 10px ; | |
color: var(--primary) ; | |
} | |
#leaderboard-info p { | |
margin-bottom: 8px ; | |
line-height: 1.5 ; | |
} | |
#leaderboard-info ul { | |
margin-bottom: 10px; | |
padding-left: 20px; | |
} | |
#leaderboard-info li { | |
margin-bottom: 4px; | |
line-height: 1.4; | |
} | |
.leaderboard-table { | |
width: 100%; | |
border-collapse: collapse; | |
border-spacing: 0; | |
font-size: 1.05em ; | |
margin-top: 15px; | |
} | |
.leaderboard-table th { | |
background-color: #FFF1E6 ; | |
color: var(--text-dark) ; | |
font-weight: 600; | |
text-align: left; | |
padding: 14px 15px ; | |
border-bottom: 1px solid var(--border-light) ; | |
font-size: 1.1em ; | |
} | |
@media (prefers-color-scheme: dark) { | |
.leaderboard-table th { | |
background-color: #3D3026 ; /* Use the primary-light variable for dark mode */ | |
color: var(--text-dark) ; | |
} | |
} | |
.leaderboard-table td { | |
padding: 12px 15px ; | |
border-bottom: 1px solid var(--border-light) ; | |
background-color: var(--background-main) ; | |
font-size: 1.05em ; | |
} | |
.leaderboard-table th.centered, | |
.leaderboard-table td.centered { | |
text-align: center; | |
} | |
.leaderboard-table td.elo-col { | |
font-weight: 600; | |
color: var(--primary) ; | |
} | |
.leaderboard-table .confidence-value { | |
color: var(--text-medium) ; | |
font-size: 0.9em; | |
font-weight: normal; | |
} | |
.html-container.svelte-phx28p.padding { | |
padding: 0 ; | |
} | |
span.svelte-7ddecg p:not(:first-child) { | |
margin-top: 0 ; | |
} | |
/* Smooth scrolling for the entire page */ | |
html { | |
scroll-behavior: smooth; | |
} | |
/* For the query section scroll margin */ | |
#query-section { | |
scroll-margin-top: 20px; | |
} | |
/* Responsive Styles */ | |
@media screen and (max-width: 768px) { | |
#query-container { | |
flex-direction: column ; | |
} | |
.query-box-row { | |
flex: 1 1 100% ; | |
max-width: 100% ; | |
margin-bottom: 10px ; | |
} | |
.query-button { | |
width: 100% ; | |
} | |
.vote-button { | |
font-size: 0.9em ; | |
padding: 10px 8px ; | |
} | |
.summary-card { | |
margin-bottom: 15px ; | |
} | |
#main-interface-area > div:nth-child(7) > div { | |
flex-direction: column ; | |
} | |
} | |
@media screen and (max-width: 480px) { | |
#main-interface-area > div:nth-child(10) > div { | |
display: grid ; | |
grid-template-columns: 1fr 1fr ; | |
gap: 8px ; | |
} | |
.vote-button { | |
margin: 0 ; | |
padding: 8px 5px ; | |
} | |
} |