:root {
  --brand-ink: #0a1f44;
  --brand-blue: #0070ad;
  --brand-cyan: #12abdb;
  --brand-sky: #5bc2e7;
  --surface: #ffffff;
  --surface-2: #f4f8ff;
  --line: #d0dff2;
  --text-soft: #4c5f80;
  --ok: #1b7f5d;
  --danger: #9b2226;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Montserrat", "Segoe UI", sans-serif;
  color: var(--brand-ink);
  background:
    radial-gradient(circle at 10% 15%, rgba(18, 171, 219, 0.18), transparent 30%),
    radial-gradient(circle at 90% 5%, rgba(0, 112, 173, 0.2), transparent 35%),
    linear-gradient(155deg, #f7fbff 0%, #edf4ff 45%, #f5fbff 100%);
}

a {
  color: var(--brand-blue);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  background: linear-gradient(135deg, #0a1f44 0%, #0070ad 60%, #12abdb 100%);
  color: #fff;
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: 0 16px 34px rgba(10, 31, 68, 0.24);
}

.hero p {
  margin-bottom: 0;
  opacity: 0.95;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.pill-link {
  display: inline-block;
  text-decoration: none;
  background: #fff;
  color: var(--brand-blue);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.pill-link.is-active {
  background: linear-gradient(135deg, #0070ad, #12abdb);
  color: #fff;
  border-color: transparent;
}

.tab-nav {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.tab-btn {
  width: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 600;
}

.tab-btn.is-active {
  background: linear-gradient(135deg, #0070ad, #12abdb);
  color: #fff;
  border-color: transparent;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 5px 18px rgba(7, 39, 83, 0.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.action-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 14px;
}

label {
  font-size: 12px;
  color: var(--text-soft);
  display: block;
  margin-bottom: 4px;
}

input,
select,
button,
textarea {
  width: 100%;
  border: 1px solid #b8cce8;
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
}

button,
.btn {
  background: linear-gradient(135deg, #0070ad, #12abdb);
  color: #fff;
  cursor: pointer;
  border: none;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

button.secondary,
.btn.secondary {
  background: linear-gradient(135deg, #2f4c7c, #3f6399);
}

.btn + .btn {
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf5ff;
}

.trace-data {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.35;
}

.muted {
  color: var(--text-soft);
  font-size: 12px;
}

.status {
  margin-top: 8px;
  font-size: 13px;
}

.status-ok {
  color: var(--ok);
}

.status-error {
  color: var(--danger);
}

.institutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  margin-top: 14px;
}

.institution-card {
  border: 1px solid #a8d5ed;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(18, 171, 219, 0.08) 0%, rgba(0, 112, 173, 0.06) 100%);
  padding: 14px;
  transition: all 0.25s ease;
}

.institution-card:hover {
  border-color: #12abdb;
  box-shadow: 0 8px 20px rgba(18, 171, 219, 0.18);
  transform: translateY(-2px);
}

.institution-card h3 {
  color: #0070ad;
  font-size: 15px;
  margin-bottom: 8px;
}

.institution-card p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 10px;
}

.institution-card a {
  font-size: 12px;
  font-weight: 600;
  color: #0070ad;
  text-decoration: none;
  transition: color 0.2s ease;
}

.institution-card a:hover {
  color: #12abdb;
  text-decoration: underline;
}

@media (max-width: 700px) {
  .container {
    padding: 14px;
  }

  .lang-switch {
    width: 100%;
    margin-left: 0;
  }

  .hero {
    padding: 18px;
  }
}
