@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg-app: #fcfcfd;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f5f7;
  --bg-hover: #ebeef2;

  --border-subtle: #e4e7ec;
  --border-strong: #d0d5dd;

  --text-primary: #101828;
  --text-secondary: #475467;
  --text-muted: #667085;
  --text-inverse: #ffffff;

  --brand-primary: #0e7490;
  --brand-accent: #f59e0b;
  --color-danger: #ef4444;
  --color-success: #10b981;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(16, 24, 40, 0.12), 0 4px 8px -2px rgba(16, 24, 40, 0.04);
  --shadow-pop: 0 20px 32px -8px rgba(16, 24, 40, 0.18);
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-app);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

section[id] {
  scroll-margin-top: 76px;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.2s;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.nav-brand h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}
.nav-brand span.v {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 4px;
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}
.nav-brand small {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-a {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}
.nav-a:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  text-decoration: none;
}
.nav-a.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-sep {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
  margin: 0 4px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  user-select: none;
}
.btn:active {
  transform: scale(0.98);
}
.btn-ghost {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
  color: var(--text-primary);
  text-decoration: none;
}
.btn-dark {
  background: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.btn-dark:hover {
  background: #1f2937;
  color: var(--text-inverse);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  text-decoration: none;
}
.btn-amber {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.btn-amber:hover {
  background: #fde68a;
  text-decoration: none;
}

.btn-cyan {
  background: #0e7490;
  color: #ffffff;
  border-color: #0891b2;
}
.btn-cyan:hover {
  background: #155e75;
  color: #ffffff;
  text-decoration: none;
}

/* ---- PAGE HEADER ---- */
.page-header {
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  padding: 32px 24px 24px;
}
.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.page-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.hero-sub {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}
.section-head {
  margin-bottom: 16px;
}
.col2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

/* ---- MAIN CONTAINER ---- */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---- NOTICE BANNER ---- */
.notice {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.notice p {
  font-size: 13px;
  color: var(--text-secondary);
}
.notice strong {
  color: var(--text-primary);
}

/* ---- SECTION TITLES ---- */
.section-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 4px;
}
.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---- TOOLBAR & TABS ---- */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}
.tab:hover {
  color: var(--text-primary);
}
.tab.active {
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}
.toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-input {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  min-width: 220px;
  background: var(--bg-surface);
  transition: all 0.15s ease;
}
.search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12);
}

/* ---- CHART SECTION ---- */
.chart-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.chart-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.chart-label-row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.chart-viewport {
  overflow-x: auto;
  padding-bottom: 96px;
  position: relative;
}
.chart-stage {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-height: 340px;
  height: 340px;
  padding: 0 32px;
  position: relative;
  border-bottom: 2px solid var(--text-primary);
  min-width: max-content;
}

.gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--border-subtle);
  pointer-events: none;
}
.gridline-label {
  position: absolute;
  left: 4px;
  top: -10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Pillar Columns */
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 44px;
  position: relative;
  cursor: default;
  z-index: 2;
  transition: transform 0.15s ease;
}
.bar-col:hover {
  z-index: 10;
  transform: translateY(-2px);
}
.bar-col:hover .tip {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.bar-col:hover .bar-name {
  color: var(--text-primary);
  font-weight: 700;
}

.bar-rect {
  width: 38px;
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 6px 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: height 0.5s cubic-bezier(0.34, 1.3, 0.64, 1), background-color 0.2s;
  gap: 4px;
  animation: barGrow 0.6s cubic-bezier(0.34, 1.3, 0.64, 1);
  transform-origin: bottom;
}

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.bar-inner-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  flex-shrink: 0;
}
.bar-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-inverse);
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.bar-foot {
  position: absolute;
  bottom: -90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 140px;
}
.bar-logo {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bar-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transform: rotate(-50deg);
  transform-origin: top left;
  position: absolute;
  left: 20px;
  top: 58px;
  pointer-events: none;
  transition: color 0.15s;
}

/* Tooltip */
.tip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 6px);
  background: var(--text-primary);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow-pop);
  pointer-events: none;
  opacity: 0;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}
.tip-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}
.tip-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
  color: #94a3b8;
}
.tip-val {
  font-family: var(--font-mono);
  color: #fbbf24;
  font-weight: 700;
}
.tip hr {
  border: none;
  border-top: 1px solid #334155;
  margin: 6px 0;
}

/* Empty message */
.empty-msg {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}
.empty-msg h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* ---- TABLE ---- */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--bg-subtle);
  transition: background-color 0.1s;
}
.tbl tr:last-child td {
  border-bottom: none;
}
.tbl tr:hover td {
  background: var(--bg-hover);
}

.model-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.model-cell .logo-sm {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tag-sm {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.score-hi {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-primary);
}
.score-num {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---- EXPLORER ---- */
.explorer-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}
.explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}
.explorer-header h4 {
  font-size: 16px;
  font-weight: 700;
}
.explorer-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.evaluator-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.task-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 800px) {
  .task-grid { grid-template-columns: 1fr; }
}
.task-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-surface);
  transition: all 0.15s ease;
}
.task-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.task-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.task-prompt {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  margin-bottom: 12px;
  white-space: pre-wrap;
  line-height: 1.5;
}
.task-answer {
  font-size: 12px;
  color: var(--text-secondary);
}
.task-answer code {
  color: var(--brand-primary);
  font-weight: 600;
}
.task-answer em {
  color: var(--text-muted);
}

/* ---- COLUMNS ---- */
.col3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 840px) {
  .col3 { grid-template-columns: 1fr; }
}
.info-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.info-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.info-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.info-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.info-card pre {
  background: #0f172a;
  color: #38bdf8;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 12px;
  overflow-x: auto;
  line-height: 1.5;
}

/* ---- MODALS ---- */
.modal-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-bg.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 28px;
  box-shadow: var(--shadow-pop);
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-bg.open .modal {
  transform: scale(1);
}
.modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
}
.modal-close:hover {
  color: var(--text-primary);
}

.fg {
  margin-bottom: 14px;
}
.fg label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.fg input, .fg select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  background: var(--bg-surface);
  transition: all 0.15s ease;
}
.fg input:focus, .fg select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12);
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.score-grid span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.15s ease;
  background: var(--bg-subtle);
}
.dropzone:hover {
  border-color: var(--brand-primary);
  background: #ecfeff;
}
.dropzone p {
  font-size: 12px;
  color: var(--text-muted);
}
.dropzone strong {
  color: var(--text-primary);
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 36px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-surface);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
}
