/*lo que la web anade al estilo del prototipo (atlas.css)*/
:root {
  --c5: #3a6ea5;
  --c6: #a63d57;
}
html {
  scroll-padding-top: 84px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 6px;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
}
.prose {
  white-space: pre-line;
  max-width: 80ch;
}
.nowrap {
  white-space: nowrap;
}

/*barra de arriba: idioma y cuenta*/
.brand small {
  white-space: nowrap;
}
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
}
.lang:hover {
  color: var(--fg);
  text-decoration: underline;
}
/*boton de modo oscuro: luna en claro, sol en oscuro*/
.theme {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.theme:hover {
  color: var(--fg);
  background: var(--surface-2);
}
.theme .sun,
.theme[aria-pressed='true'] .moon {
  display: none;
}
.theme[aria-pressed='true'] .sun {
  display: block;
}
.menu {
  position: relative;
}
.menu > summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu > summary::-webkit-details-marker {
  display: none;
}
.menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 6px;
  display: grid;
}
.menu a,
.menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: 0;
  background: none;
  border-radius: 6px;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
}
.menu a:hover,
.menu button:hover {
  background: var(--surface-2);
}
.flashes {
  display: grid;
  gap: 8px;
  padding-top: 16px;
}
.flash {
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--accent-soft);
  font-size: 14px;
}
.flash.success {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.flash.error,
.flash.warning {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

/*avisos dentro de las paginas*/
.note-box,
.fix-box {
  border-radius: var(--r);
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 14px;
  background: var(--accent-soft);
}
.fix-box {
  background: var(--warn-bg);
  border: 1px dashed var(--warn);
}
.fix-box ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.problem {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.warn-line {
  color: var(--warn);
  font-weight: 600;
}
.danger-zone {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--muted);
}
.danger-zone summary {
  cursor: pointer;
}
.danger-zone p {
  margin: 8px 0;
}
.err ul,
.errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

/*pestanas y selectores que ahora son enlaces*/
.tabs a {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs a.on {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.seg a {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  text-decoration: none;
}
.seg a:last-child {
  border-right: 0;
}
.seg a.on {
  background: var(--accent);
  color: var(--accent-fg);
}
.seg.radios label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.seg.radios label:last-child {
  border-right: 0;
}
.seg.radios input {
  position: absolute;
  width: 1px;
  opacity: 0;
}
.seg.radios span {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--muted);
}
.seg.radios input:checked + span {
  background: var(--accent);
  color: var(--accent-fg);
}
.seg.radios input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.ov-items a {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
}
.ov-items a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cmp-sel a,
.cmp-sel .off {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}
.cmp-sel a.on {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cmp-sel .off {
  opacity: 0.6;
}

/*filas que se abren (ficha y comparar)*/
summary.q-row,
summary.db-row {
  list-style: none;
}
summary.q-row::-webkit-details-marker,
summary.db-row::-webkit-details-marker {
  display: none;
}
.qi[open] {
  border-color: var(--accent);
}
.qi[open] .chev {
  transform: rotate(180deg);
}
.db-item[open] .db-row {
  background: var(--surface-2);
}
.q-row.as-head {
  cursor: default;
  grid-template-columns: 40px minmax(0, 1fr) auto;
}
.q-row.as-head:hover {
  background: none;
}
a.linkbtn {
  text-decoration: none;
}
.reflist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
}
.reflist blockquote {
  margin: 4px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.axis {
  display: inline-block;
  font-size: 11.5px;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: 4px;
  padding: 0 6px;
  margin-left: 4px;
  line-height: 18px;
}
.discrepancy {
  border: 1px dashed var(--warn);
  background: var(--warn-bg);
  border-radius: var(--r);
  padding: 12px 16px;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
}
.changes {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 5px;
  font-size: 13.5px;
}

/*asistente*/
.ev.wide {
  max-width: 1120px;
}
.ev.narrow {
  max-width: 560px;
}
.track a {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  color: var(--fg);
  text-decoration: none;
  position: relative;
}
.track a.s0 {
  background: var(--s0);
  color: var(--s0-fg);
  border-color: transparent;
}
.track a.s1 {
  background: var(--s1);
  color: var(--s1-fg);
  border-color: transparent;
}
.track a.s2 {
  background: var(--s2);
  color: var(--s2-fg);
  border-color: transparent;
}
.track a.s3 {
  background: var(--s3);
  color: var(--s3-fg);
  border-color: transparent;
}
.track a.cur {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
/*con nivel pero sin la evidencia completa*/
.track a[class^='s']:not(.full)::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warn);
  border: 1.5px solid var(--bg);
}
.track a.fin {
  width: auto;
  padding: 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.ev-sec.first {
  border-top: 0;
  padding-top: 0;
}
label.level {
  margin: 0;
  font-weight: 400;
  position: relative;
}
label.level input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
label.level:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
label.level:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.levels.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hq legend {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 6px;
}
.only-0,
#ev:has(#level-form input[name='level'][value='3']:checked) .not-3,
.only-prop-0 {
  display: none;
}
#ev:has(#level-form input[name='level'][value='0']:checked) .only-0,
#ev:has(input[name='to_level'][value='0']:checked) .only-prop-0 {
  display: block;
}
#ev:has(input[name='kind'][value='evidence']:checked) .only-score {
  display: none;
}
.refs {
  display: grid;
  gap: 10px;
}
.ref {
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px 16px;
}
.ref > summary {
  cursor: pointer;
  font-weight: 600;
}
.ref-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.ref-head b {
  display: block;
}
.axes {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.axes legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.axes label {
  margin: 0;
  font-weight: 400;
  font-size: 13.5px;
  display: flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
}
input[type='checkbox'],
input[type='radio'] {
  width: auto;
  accent-color: var(--accent);
}
.more {
  margin-top: 12px;
  font-size: 13.5px;
}
.more summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}
.add-ref {
  margin-top: 14px;
}
.checks-box {
  margin-top: 26px;
  border-radius: 8px;
  background: var(--surface-2);
  padding: 16px 18px;
}
.checks-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.checks-box .checks b {
  font-weight: 600;
}
.ic.ok {
  color: var(--ok);
}
.missing,
.people {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.people li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.sign {
  margin-top: 16px;
}
.sign input[name='coi_text'] {
  margin-top: 8px;
}
.sign:not(:has(input[value='yes']:checked)) input[name='coi_text'] {
  display: none;
}

/*zona del equipo*/
.check-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  padding: 0 18px 18px;
}
.q-detail.flat {
  padding: 0;
  align-content: start;
}
.check-form {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 14px 16px;
  align-self: start;
}
.check-form legend {
  font-weight: 600;
  font-size: 14px;
}
.check-row.is-ok {
  border-left: 4px solid var(--ok);
}
.check-row.is-fix {
  border-left: 4px solid var(--warn);
}
.decide {
  margin-top: 20px;
  position: sticky;
  bottom: 12px;
  box-shadow: var(--shadow);
}

/*cuentas*/
.btn.orcid {
  gap: 10px;
  padding: 9px 16px;
  margin: 8px 0 4px;
}
.orcid-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: -2px;
}
.account .count {
  display: inline-block;
}
.draft.new {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.draft > div > span {
  display: block;
}
.account-card h1,
.account-card h2 {
  margin-bottom: 12px;
}
/* campo trampa del registro: fuera de la vista, pero no display:none, que algunos bots lo miran */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.account-card p {
  margin: 10px 0;
}
.account-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.account-card h2 {
  margin-top: 24px;
}
.account-card input[type='radio'] + label {
  display: inline;
}
.account-card .form-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 900px) {
  .check-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .decide {
    position: static;
  }
}
.hint ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

@media (max-width: 1080px) {
  .topbar .nav {
    order: 3;
    width: 100%;
  }
}
@media (max-width: 720px) {
  .brand small {
    font-size: 10.5px;
  }
  .track a {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  .levels.compact {
    grid-template-columns: minmax(0, 1fr);
  }
  .q-row.as-head {
    grid-template-columns: 32px minmax(0, 1fr);
  }
  summary.db-row .sr + .db-track {
    grid-column: 1 / -1;
  }
}
