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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #0b0b0b;
  color: #e5e5e5;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

header {
  margin-bottom: 40px;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #9ca3af;
  font-size: 14px;
  margin-top: 4px;
}

/* Input */
.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

#ref-input {
  flex: 1;
  padding: 9px 12px;
  font-size: 15px;
  font-family: inherit;
  background: #161616;
  border: 1px solid #1e1e1e;
  border-radius: 6px;
  color: #e5e5e5;
  outline: none;
  transition: border-color 0.15s;
}

#ref-input:focus {
  border-color: #333;
}

#ref-input::placeholder {
  color: #555;
}

#submit-btn {
  padding: 9px 18px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #e5e5e5;
  cursor: pointer;
  transition: background 0.15s;
}

#submit-btn:hover {
  background: #222;
}

#submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Error */
.error {
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #f87171;
  background: #1c1111;
  border: 1px solid #331a1a;
  border-radius: 6px;
}

/* NT block */
#nt-block {
  margin-bottom: 32px;
  padding: 16px;
  background: #111;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
}

.nt-ref {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.nt-text {
  font-size: 14px;
  color: #9ca3af;
  font-style: italic;
}

/* Results */
h2 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  color: #666;
  letter-spacing: 0.3px;
}

/* Result card */
.result-card {
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #131313 0%, #101010 100%);
  border: 1px solid #1a1a1a;
  border-radius: 8px;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.result-ref {
  font-size: 15px;
  font-weight: 600;
}

.result-score {
  font-size: 13px;
  color: #555;
  font-variant-numeric: tabular-nums;
}

/* Evidence */
.evidence-section {
  margin-bottom: 8px;
}

.evidence-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  padding: 2px 7px;
  background: linear-gradient(180deg, #1a1a1a 0%, #151515 100%);
  border: 1px solid #262626;
  border-radius: 4px;
}

.evidence-value {
  font-size: 13px;
  color: #999;
}

.phrase-line {
  font-size: 13px;
  color: #d4d4d4;
  font-style: italic;
  padding: 1px 0;
}

.crossref-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #6b9fd4;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 6px;
  padding: 2px 7px;
  background: linear-gradient(180deg, #141c26 0%, #111a24 100%);
  border: 1px solid #1e3050;
  border-radius: 4px;
}

/* OT text toggle */
.ot-text-toggle {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  border: 1px solid #262626;
  background: linear-gradient(180deg, #1a1a1a 0%, #151515 100%);
  border-radius: 4px;
  padding: 2px 7px;
  margin-top: 8px;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.ot-text-toggle:hover {
  color: #aaa;
  border-color: #333;
}

.ot-text-content {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  margin-top: 10px;
  padding: 10px 0 0;
  border-top: 1px solid #161616;
}

.ot-text-content mark {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  padding: 0 1px;
  border-radius: 2px;
}

/* Suppressed */
.suppressed-title {
  color: #444;
  font-size: 12px;
}

.suppressed-item {
  font-size: 12px;
  color: #444;
  padding: 6px 0;
  border-bottom: 1px solid #141414;
}

.suppressed-reason {
  color: #333;
  font-style: italic;
}

.loading {
  color: #555;
  font-size: 14px;
  padding: 20px 0;
}
