/* Manrope, self-hosted: the CSP allows fonts from this origin only. SIL OFL 1.1, see assets/fonts/OFL.txt. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./assets/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #142d56;
  --blue: #2b54a0;
  --blue-hover: #1f4180;
  --blue-soft: #e9eef7;
  --ink: #1b1b1b;
  --text: #2e2e2e;
  --text-soft: #595959;
  --field: #f2f2f2;
  --panel: #f3f3f3;
  --line: #e2e2e2;
  --radius-card: 12px;
  --radius-field: 4px;
  --gutter: clamp(16px, 4vw, 48px);
  --content: 1280px;

  /* Names the console scripts and older rules still use. */
  --brand-ink: var(--ink);
  --brand-blue: var(--blue);
  --brand-blue-deep: var(--navy);
  --brand-cyan: var(--blue);
  --brand-sky: var(--blue-soft);
  --brand-mist: var(--panel);
  --surface: #ffffff;
  --surface-2: var(--panel);
  --health-teal: #1f6f5c;
  --health-mint: #e6f3ee;
  --health-clay: #a4442f;
  --ok: #1c7a58;
  --danger: #a4223c;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

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

/* Lo que el navegador oculta desaparece de verdad. Sin esto, un control con
   el atributo hidden o con la clase .hidden seguía viéndose en cuanto una
   regla le daba display: el 20 de septiembre de 2026 un usuario de entidad
   veía "Usuarios y solicitudes" y, siendo consumidor, la pestaña "Proveedor
   de datos", aunque el guion las había ocultado. */
[hidden],
.hidden {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.container {
  max-width: none;
  margin: 0;
  padding: 0 0 64px;
}

/* One content column, whatever the page. */
.hero,
.card,
.tab-nav,
.programme-strip,
.section-tabs,
.programme-layout,
.container > h1,
.container > p,
.container > .status,
.tab-panel > .status,
.tab-panel > p {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

/* Top bar */
.site-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  min-height: 40px;
  padding: 0 var(--gutter);
  background: var(--navy);
  color: #fff;
  font-size: 15px;
}

.site-topbar-links,
.utility-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 32px;
}

.site-topbar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
}

.site-topbar a:hover {
  color: #fff;
  text-decoration: underline;
}

.utility-actions a {
  font-weight: 600;
}

/* Header */
.site-masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 40px;
  min-height: 80px;
  padding: 0 var(--gutter);
  background: #fff;
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-lockup:hover {
  color: var(--ink);
}

.brand-mark-shell {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.brand-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-lockup-copy {
  display: grid;
  line-height: 1.15;
}

.brand-lockup-copy strong {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-kicker {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.brand-wordmark,
.brand-wordmark[src=""],
.brand-mark[src=""] {
  display: none;
}

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

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 80px;
  color: var(--blue);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.pill-link:hover {
  color: var(--blue-hover);
}

.pill-link.is-active {
  box-shadow: inset 0 -3px 0 var(--blue);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.lang-switch .pill-link {
  min-height: 40px;
  font-size: 15px;
  font-weight: 600;
}

.lang-switch .pill-link.is-active {
  color: var(--ink);
  box-shadow: none;
}

.pill-link.nav-cta {
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}

.pill-link.nav-cta:hover {
  background: var(--blue-hover);
  color: #fff;
}

/* Page intro */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 48px;
  color: var(--ink);
  font-size: 15px;
}

.breadcrumb a {
  color: var(--ink);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.hero {
  padding: 28px 0 48px;
  color: var(--ink);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero p {
  max-width: 64ch;
  margin: 0;
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.6;
}

.container > h1 {
  margin-top: 40px;
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  letter-spacing: -0.02em;
}

.container > p.muted {
  margin-top: 0;
  margin-bottom: 6px;
}

/* Home */
.programme-strip {
  margin-top: 40px;
  margin-bottom: 40px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--panel);
}

.programme-claim {
  padding: 18px 28px;
  background: var(--navy);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.programme-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.programme-facts div {
  display: grid;
  gap: 4px;
  padding: 20px 28px;
  border-right: 1px solid #dcdcdc;
}

.programme-facts div:last-child {
  border-right: 0;
}

.programme-facts span {
  color: var(--text-soft);
  font-size: 14px;
}

.programme-facts strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.section-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.section-tabs a:hover {
  color: var(--blue);
  box-shadow: inset 0 -3px 0 var(--blue);
}

.programme-layout {
  margin-bottom: 56px;
}

.programme-copy {
  max-width: 880px;
}

.programme-copy h1 {
  margin: 0 0 28px;
  color: var(--ink);
  font-size: clamp(2.4rem, 4.8vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.programme-copy p {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
}

.hero-home-copy h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.2rem);
  line-height: 1.04;
}

.hero-badge,
.home-catalog-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.home-catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.signal-card {
  display: grid;
  gap: 8px;
  padding: 24px 28px;
  border-radius: var(--radius-card);
  background: var(--panel);
}

.signal-card span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.signal-card strong {
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.35;
}

/* Sections */
.card {
  position: relative;
  margin-bottom: 48px;
  padding: 0 0 48px;
  border-bottom: 1px solid var(--line);
  background: none;
}

.card:last-child {
  border-bottom: 0;
}

.card h2 {
  max-width: 900px;
  margin-bottom: 16px;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.15;
}

.card h3 {
  font-size: 1.15rem;
}

.card p {
  line-height: 1.65;
}

.card .card {
  width: auto;
  margin: 16px 0 0;
  padding: 24px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--panel);
}

.card .card :is(input, select, textarea),
.card[class*="audit-panel--"] :is(input, select, textarea) {
  background-color: #fff;
}

/* Sections the console fills with a background of their own (app.js marks them
   audit-panel--*) need room inside it, or their text meets the edge. */
.card[class*="audit-panel--"] {
  padding: clamp(20px, 3vw, 32px);
  border-bottom: 0;
  border-radius: var(--radius-card);
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.governance-band,
.federation-band {
  padding: clamp(28px, 4vw, 48px);
  border: 0;
  border-radius: var(--radius-card);
  background: var(--navy);
  color: #fff;
}

.governance-band h2,
.federation-band h2 {
  color: #fff;
}

.governance-band p,
.federation-band p {
  color: rgba(255, 255, 255, 0.9);
}

.governance-band .section-kicker,
.federation-band .section-kicker {
  color: #c9d6ee;
}

.governance-band a,
.federation-band a {
  color: #fff;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.feature-list,
.next-steps {
  display: grid;
  gap: 16px;
}

.next-steps {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-list div,
.next-steps a {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 24px 28px;
  border-radius: var(--radius-card);
  background: var(--panel);
  color: inherit;
  text-decoration: none;
}

.feature-list strong,
.next-steps strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.feature-list span,
.next-steps span {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.55;
}

.next-steps a {
  transition: background 0.15s ease;
}

.next-steps a:hover {
  background: #e8e8e8;
}

.next-steps a:hover strong {
  color: var(--blue);
}

/* Forms */
label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius-field);
  background-color: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #666;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
}

select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231b1b1b' stroke-width='2'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 14px 9px;
}

select[multiple] {
  padding-right: 16px;
  background-image: none;
}

input[type="checkbox"],
input[type="radio"] {
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  accent-color: var(--blue);
}

input[type="file"] {
  min-height: 0;
  padding: 12px;
}

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

/* A submit button in its own cell sits on the fields' baseline, not their labels'. */
form.grid > div:has(> button:only-child) {
  align-self: end;
}

/* Buttons */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

button:hover,
.btn:hover {
  background: var(--blue-hover);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary,
.btn.secondary {
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px var(--blue);
}

button.secondary:hover,
.btn.secondary:hover {
  background: var(--blue-soft);
  color: var(--blue-hover);
}

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

td button,
td .btn {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* A field inside a row (the profile a member or a request is given) keeps the
   row's height instead of a form field's. */
td select,
td input {
  width: auto;
  min-width: 14ch;
  min-height: 40px;
  padding: 8px 12px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
}

td select {
  padding-right: 36px;
  background-position: right 12px center;
}

/* Tabs */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 32px;
}

.tab-btn {
  min-height: 44px;
  padding: 0 22px;
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px var(--blue);
  font-size: 15px;
}

.tab-btn:hover {
  background: var(--blue-soft);
  color: var(--blue-hover);
}

.tab-btn.is-active,
.tab-btn.is-active:hover {
  background: var(--blue);
  color: #fff;
}

.tab-panel {
  display: none;
}

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

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
}

/* Grey cards */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.action-card,
.institution-card,
.home-catalog-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 28px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--panel);
}

.action-card h3,
.institution-card h3,
.home-catalog-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.3;
}

.action-card p,
.institution-card p,
.home-catalog-card p {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

.action-card .btn {
  justify-self: start;
}

.institutions-grid,
.home-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 16px 0 24px;
}

/* Una descripción de tres líneas y otra de veinte dejaban la fila descuadrada:
   la tarjeta reparte siempre las mismas cinco bandas y el texto se acota, así
   que la política queda abajo, a la misma altura en todas. */
.home-catalog-card {
  grid-template-rows: auto auto 1fr auto auto;
  align-content: stretch;
  min-height: 320px;
  padding: 24px;
}

.home-catalog-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.home-catalog-entity {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.home-catalog-card-policy {
  display: grid;
  gap: 6px;
  align-content: start;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.home-catalog-card-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Filtros y paginador: buscar por término, por entidad, y avanzar de doce en
   doce en lugar de bajar por un catálogo sin final. */
.home-catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-top: 16px;
}

.home-catalog-field {
  display: grid;
  gap: 6px;
  flex: 1 1 220px;
  min-width: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.home-catalog-field input,
.home-catalog-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.home-catalog-field input:focus,
.home-catalog-field select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

/* El catálogo del consumidor: seis columnas de anchos muy distintos dejaban la
   descripción en una columna de dos palabras y la licencia desbordando. Los
   anchos se reparten y todo lo largo parte donde haga falta. */
#federatedTable {
  table-layout: fixed;
  width: 100%;
}

#federatedTable th:nth-child(1),
#federatedTable td:nth-child(1) {
  width: 13%;
}

#federatedTable th:nth-child(2),
#federatedTable td:nth-child(2) {
  width: 17%;
}

#federatedTable th:nth-child(3),
#federatedTable td:nth-child(3) {
  width: 22%;
}

#federatedTable th:nth-child(4),
#federatedTable td:nth-child(4) {
  width: 19%;
}

#federatedTable th:nth-child(5),
#federatedTable td:nth-child(5) {
  width: 17%;
}

#federatedTable th:nth-child(6),
#federatedTable td:nth-child(6) {
  width: 12%;
}

#federatedTable td {
  overflow-wrap: anywhere;
  vertical-align: top;
}

/* "Aceptar" partido en dos líneas no parece un botón. La palabra no se corta,
   aunque su columna sea la más estrecha de la tabla. */
#federatedTable td:nth-child(6) button {
  white-space: nowrap;
}

.home-catalog-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.home-catalog-pager-state {
  color: var(--text-soft);
  font-size: 14px;
}

.institution-card a {
  font-weight: 700;
  text-decoration: none;
}

.institution-card a:hover {
  text-decoration: underline;
}

.home-catalog-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 18px;
}

.home-catalog-summary > div {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 104px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background: var(--panel);
}

.home-catalog-summary > div strong,
.home-catalog-summary > div span {
  display: block;
}

.governance-facts > div {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.governance-facts > div strong {
  color: #fff;
}

.home-catalog-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-right: 8px;
  color: var(--navy);
  font-weight: 700;
}

.home-catalog-metric strong {
  font-size: 1.8rem;
  line-height: 1;
}

.home-catalog-sources {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 14px;
}

.home-catalog-card-head,
.home-catalog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-catalog-card-head {
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.home-catalog-card-meta span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Console */
.asset-stage-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.flow-stage-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.asset-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--panel);
  color: var(--text-soft);
}

.asset-stage span {
  display: inline-flex;
  flex: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.asset-stage strong {
  font-size: 14px;
}

.asset-stage.is-active {
  background: var(--blue-soft);
  color: var(--ink);
}

.asset-stage.is-done {
  background: #e6f3ee;
  color: #176946;
}

.asset-stage.is-done span {
  color: #176946;
}

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

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

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

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

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

.audit-panel--info {
  background: #f5f8fc;
}

.audit-panel--safe {
  background: #f1f9f5;
}

.audit-panel--warn {
  background: #fff8ec;
}

.audit-panel--danger {
  background: #fdf2f3;
}

.audit-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: #fff;
}

.audit-eyebrow,
.audit-meta-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-summary-text {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.audit-hero-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.audit-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.audit-chip--safe {
  background: #daf2e6;
  color: #176946;
}

.audit-chip--warn {
  background: #ffefcc;
  color: #7a4f00;
}

.audit-chip--danger {
  background: #fde0e3;
  color: #9b2226;
}

.audit-chip--info {
  background: var(--blue-soft);
  color: var(--blue-hover);
}

.audit-chip--outline {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.audit-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.audit-meta-card {
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: #fff;
}

.audit-reason-list {
  display: grid;
  gap: 10px;
}

.audit-reason {
  padding: 14px 16px;
  border-left: 4px solid transparent;
  border-radius: var(--radius-card);
  background: #fff;
}

.audit-reason--high {
  border-left-color: #c24b56;
}

.audit-reason--medium {
  border-left-color: #d69a2d;
}

.audit-reason--low {
  border-left-color: #4a9a73;
}

.audit-reason p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.audit-evidence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.audit-token {
  display: inline-flex;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 600;
}

.audit-token strong {
  color: var(--navy);
}

.catalog-metadata-cell {
  display: grid;
  gap: 12px;
  min-width: 280px;
}

.catalog-metadata-group {
  display: grid;
  gap: 6px;
}

.catalog-metadata-group > strong {
  color: var(--navy);
}

.catalog-metadata-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-recommendations {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.audit-recommendations li {
  line-height: 1.5;
}

/* Home: the signals beside the intro */
.hero-home-visual {
  display: grid;
  gap: 12px;
}

.signal-card-primary {
  background: var(--navy);
}

.signal-card-primary span {
  color: #c9d6ee;
}

.signal-card-primary strong {
  color: #fff;
}

.signal-card-accent {
  background: var(--blue-soft);
}

.hero-actions .btn,
.home-catalog-actions .btn,
.home-catalog-actions button {
  margin-top: 0;
}

.card-intro > .btn {
  margin: 8px 8px 0 0;
}

#homeGaiaxTable {
  display: block;
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

/* Contract policies in catalogue tables */
.catalog-policy-cell {
  display: grid;
  gap: 8px;
  min-width: 240px;
}

.catalog-policy-summary,
.catalog-policy-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.audit-reason-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Narrower screens */
@media (max-width: 1120px) {
  .site-masthead {
    position: static;
    padding-block: 12px;
  }

  .pill-link {
    min-height: 44px;
  }

  .pill-link.is-active {
    box-shadow: inset 0 -2px 0 var(--blue);
  }

  .lang-switch {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .flow-stage-row,
  .programme-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .programme-facts div:nth-child(2) {
    border-right: 0;
  }

  .split-grid,
  .hero-home {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-topbar {
    padding-block: 4px;
    font-size: 14px;
  }

  .site-topbar a {
    min-height: 32px;
  }

  .site-topbar-links,
  .utility-actions,
  .top-nav {
    gap: 0 20px;
  }

  .pill-link {
    font-size: 16px;
  }

  .breadcrumb {
    margin-bottom: 28px;
  }

  .hero {
    padding-bottom: 32px;
  }

  .asset-stage-row,
  .flow-stage-row,
  .programme-facts {
    grid-template-columns: 1fr;
  }

  .programme-facts div {
    border-right: 0;
    border-bottom: 1px solid #dcdcdc;
  }

  .programme-facts div:last-child {
    border-bottom: 0;
  }

  .card {
    margin-bottom: 32px;
    padding-bottom: 32px;
  }

  .action-card,
  .feature-list div,
  .next-steps a {
    padding: 22px;
  }

  button,
  .btn {
    width: 100%;
  }

  td button,
  td .btn,
  .tab-btn,
  .pill-link.nav-cta {
    width: auto;
  }
}

/* Grouped form fields (e.g. the Gaia-X legal data in the sign-up form): a grey panel, no browser border. */
fieldset {
  margin: 0;
  padding: 20px 24px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--panel);
}

fieldset legend {
  padding: 0;
  font-weight: 700;
  color: var(--navy);
}

/* On the grey panel a grey field disappears, so the fields inside a group are
   white, the way they are inside a nested card. */
fieldset :is(input, select, textarea) {
  background-color: #fff;
}

/* A choice between a few mutually exclusive routes (e.g. the kind of sign-up):
   the whole card is the label, so the hit area is the option, not the dot. */
.choice-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  background: var(--surface);
  font-weight: 400;
  cursor: pointer;
}

.choice:hover {
  border-color: var(--blue);
}

.choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.choice input[type="radio"] {
  flex: 0 0 auto;
  margin-top: 2px;
}

.choice-copy {
  display: block;
}

.choice-copy strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.choice-copy .muted {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}

/* El logotipo de un participante: una dirección externa, nunca una imagen
   guardada por el espacio de datos. Se le fija la altura para que una imagen
   enorme no deforme una fila, y `onerror` la esconde cuando el sitio del
   titular deja de servirla: el catálogo sigue leyéndose igual sin ella. */
.provider-logo {
  height: 24px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 2px;
  flex: 0 0 auto;
}

.provider-logo-card {
  height: 32px;
  max-width: 150px;
}

.catalog-provider {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* La tarjeta del logotipo en la consola del conector. */
.connector-logo-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  margin: 12px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
}

.connector-logo {
  height: 56px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

.connector-logo-preview .muted {
  margin: 0;
}

/* Modelo de datos de un activo: EDINT y su equivalente en Smart Data Models. */
.home-catalog-card-models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.25rem 0 0.5rem;
}

.semantic-model-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.4;
  text-decoration: none;
  border: 1px solid currentColor;
}

.semantic-model-badge--edint {
  color: #0b5d7a;
}

.semantic-model-badge--sdm {
  color: #6b3fa0;
}

.semantic-model-badge--gap {
  color: #6b6b6b;
  border-style: dashed;
}

/* Asistente del catálogo de la portada (ui/home-assistant.js). Va dentro de
   la sección del catálogo, encima del buscador: sugiere y el buscador enseña. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.catalog-assistant {
  display: grid;
  gap: 12px;
  margin: 8px 0 24px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--blue-soft);
}

.catalog-assistant-head h3 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.15rem;
}

.catalog-assistant-head p {
  margin: 0;
}

.catalog-assistant-log {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
}

.catalog-assistant-log:empty {
  display: none;
}

.assistant-msg {
  display: grid;
  gap: 6px;
  max-width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: #fff;
}

.assistant-msg p {
  margin: 0;
}

.assistant-msg--user {
  justify-self: end;
  max-width: min(560px, 100%);
  background: var(--navy);
  color: #fff;
}

.assistant-msg--user .assistant-msg-who {
  color: rgba(255, 255, 255, 0.75);
}

.assistant-msg--refusal,
.assistant-msg--notice {
  border-left: 4px solid var(--blue);
}

.assistant-msg-who {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.assistant-dataset {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.assistant-dataset-head {
  display: grid;
  gap: 2px;
}

.assistant-dataset-head strong {
  color: var(--ink);
  line-height: 1.3;
}

.assistant-dataset-provider,
.assistant-dataset-why {
  color: var(--text-soft);
  font-size: 13px;
}

.assistant-dataset-desc {
  font-size: 14px;
}

.assistant-dataset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assistant-dataset-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.assistant-link {
  padding: 6px 12px;
  font-size: 13px;
}

.assistant-related-title {
  margin-top: 6px !important;
  font-weight: 700;
}

.assistant-recommendation {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--panel);
}

.assistant-note {
  font-size: 12px;
}

.assistant-drafting {
  color: var(--text-soft);
  font-size: 13px;
  font-style: italic;
}

.assistant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-chip {
  padding: 6px 12px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.assistant-chip:hover,
.assistant-chip:focus-visible {
  background: var(--blue);
  color: #fff;
}

.catalog-assistant-form {
  display: flex;
  gap: 10px;
}

.catalog-assistant-form input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 700px) {
  .catalog-assistant {
    padding: 16px;
  }

  .catalog-assistant-form {
    flex-direction: column;
  }
}

/* Entorno de trabajo de la consola (ui/console-workspace.js). */
.ws-table-wrap {
  overflow-x: auto;
  margin: 12px 0 8px;
}

.ws-agreements td,
.ws-agreements th {
  vertical-align: top;
}

.ws-desc {
  max-width: 420px;
  font-size: 13px;
}

.ws-ok {
  color: var(--ok);
  font-weight: 600;
}

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

.ws-tool {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--panel);
  cursor: pointer;
}

.ws-tool--off {
  cursor: default;
  opacity: 0.75;
}

.ws-actions {
  margin-top: 16px;
}

.ws-env-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ws-banner {
  margin: 0;
  padding: 10px 14px;
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 600;
}

.ws-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.ws-datasets {
  display: grid;
  align-content: start;
  gap: 12px;
}

.ws-dataset {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  background: var(--panel);
}

.ws-dataset p {
  margin: 0;
  font-size: 13px;
}

.ws-dataset-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ws-swatch {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.ws-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ws-manual-geo,
.ws-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.ws-field {
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
}

.ws-inner-nav {
  margin-bottom: 12px;
}

.ws-map {
  width: 100%;
  height: 560px;
  margin-top: 10px;
  border-radius: 8px;
  background: var(--panel);
}

.ws-notebook {
  width: 100%;
  height: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* La ventana de diálogo del lenguaje natural dentro del entorno de trabajo.
   Reutiliza las burbujas .assistant-msg del chat del catálogo. */
.ws-chat {
  margin-top: 10px;
}

.ws-chat-controls {
  margin-bottom: 10px;
}

.ws-chat-controls .ws-field {
  max-width: 420px;
}

.ws-chat .catalog-assistant-log {
  min-height: 160px;
  max-height: 520px;
  overflow-y: auto;
}

.ws-chat .ws-table-wrap {
  margin-top: 8px;
  max-height: 320px;
  overflow: auto;
}

table.ws-result {
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.ws-result th,
table.ws-result td {
  border: 1px solid var(--line);
  padding: 4px 8px;
  text-align: left;
  white-space: nowrap;
}

table.ws-result th {
  background: var(--panel);
  position: sticky;
  top: 0;
}

.ws-chat-details {
  margin-top: 8px;
}

.ws-chat-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
}

.ws-chat-sql {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.ws-chat-note {
  margin-top: 10px;
  font-size: 0.85rem;
}

/* La respuesta en lenguaje natural (paso de razonamiento), destacada sobre la
   tabla de evidencia. */
.ws-chat-answer {
  font-size: 1rem;
  line-height: 1.5;
}

.ws-chat-answer:not(:empty) {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent, #2b54a0);
  background: var(--panel);
  border-radius: 0 6px 6px 0;
}

.ws-chat-answer p {
  margin: 0 0 6px;
}

.ws-chat-answer p:last-child {
  margin-bottom: 0;
}

.ws-chat-count {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 6px;
}

.ws-popup dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  max-height: 220px;
  margin: 6px 0 0;
  overflow-y: auto;
  font-size: 12px;
}

.ws-popup dt {
  font-weight: 600;
}

.ws-popup dd {
  margin: 0;
  word-break: break-word;
}

@media (max-width: 900px) {
  .ws-layout {
    grid-template-columns: 1fr;
  }

  .ws-map {
    height: 420px;
  }
}

.ws-agreements input[type="checkbox"],
.ws-tool input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
}
