:root {
  --ui-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --ui-line: #e5e7eb;
}

body {
  background: radial-gradient(circle at top right, #fbfdff, #f3f4f6 48%);
}

.uma-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--ui-line);
}

.uma-brand-link {
  display: inline-block;
}

.uma-brand-image {
  width: min(420px, 100%);
  height: auto;
  display: block;
}

.app {
  max-width: 1100px;
}

.panel {
  background: #fff;
  border: 1px solid var(--ui-line);
  border-radius: 1rem;
  box-shadow: var(--ui-shadow);
  padding: 1.25rem;
}

.prompt-input {
  min-height: 90px;
  resize: vertical;
}

.hint {
  color: #6b7280;
}

.hidden {
  display: none;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--ui-line);
  border-radius: 0.6rem;
  color: #6b7280;
}

.checklist li .icon {
  font-weight: 700;
}

.checklist li.done {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.32);
}

.checklist li.active {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.3);
  background: rgba(29, 78, 216, 0.04);
}

.answer {
  line-height: 1.7;
  white-space: normal;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.answer table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0.5rem 0 0;
  border: 1px solid var(--ui-line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #ffffff;
}

.answer thead th {
  background: #f8fafc;
  color: #111827;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--ui-line);
  padding: 0.75rem 0.85rem;
  white-space: nowrap;
}

.answer tbody td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  color: #1f2937;
}

.answer tbody tr:last-child td {
  border-bottom: 0;
}

.answer tbody tr:nth-child(even) {
  background: #fbfdff;
}

.answer :is(th, td) {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .answer table {
    min-width: 760px;
  }
}

.sources {
  margin: 0;
}

.sources--bibliography {
  padding-left: 1.45rem;
}

.sources--bibliography li {
  margin: 0 0 0.55rem;
  padding-left: 0.2rem;
  line-height: 1.55;
}

.sources--bibliography li::marker {
  font-weight: 700;
  color: #374151;
}

.sources--bibliography .bib-title {
  font-style: italic;
  color: #111827;
}

.sources--bibliography .bib-meta {
  color: #6b7280;
  font-size: 0.95rem;
}

.sources--bibliography .bib-link {
  color: #0f4fa8;
  text-decoration: underline;
}

.uma-footer {
  background: #ffffff;
  border-top: 1px solid var(--ui-line);
}

#portal-footer-links .blockHiddenTitle {
  display: none;
}

#portal-footer-links .blockBody {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#portal-footer-links .logo_footer {
  max-height: 46px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  #portal-footer-links .blockBody {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  #portal-footer-links .logo_footer {
    max-height: 42px;
  }
}
