.portal {
  background: var(--bruma, #e9eef3);
  color: var(--azul, #132646);
}
.portal main { width: min(100% - 2rem, 48rem); margin: 2rem auto 4rem; }
.portal h1 { margin: 1rem 0; line-height: 1.15; }
.portal section { margin-top: 1rem; padding: clamp(1rem, 4vw, 2rem); border-radius: 1rem; background: #fff; }
.portal form { display: grid; gap: .75rem; margin-top: .75rem; }
.portal label { display: grid; gap: .25rem; }
.portal :is(input, select, textarea) {
  width: 100%; max-width: 100%; padding: .55rem; border: 1px solid #9db4d6;
  border-radius: .4rem; background: #fff; color: inherit; font: inherit;
}
.portal button {
  justify-self: start; padding: .55rem 1rem; border: 0; border-radius: .5rem;
  background: #132646; color: #fff; font: inherit; cursor: pointer;
}
.portal details { padding: .65rem 0; border-bottom: 1px solid #e9eef3; }
.portal summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.portal-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 1.25rem 0; }
.portal-nav a { font-weight: 600; text-decoration: underline; }
.portal-admin main { width: min(100% - 2rem, 68rem); }
.portal-admin .portal-nav a {
  border: 1px solid #9db4d6;
  border-radius: .5rem;
  padding: .45rem .75rem;
  text-decoration: none;
}
.portal-admin .portal-nav a[aria-current="page"] { background: #132646; color: #fff; border-color: #132646; }
.portal a:focus-visible, .portal summary:focus-visible, .portal button:focus-visible {
  outline: 3px solid #0a1160;
  outline-offset: 3px;
}
.portal-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; }
.portal-overview a { padding: 1rem; border: 1px solid #9db4d6; border-radius: .65rem; }
.portal-overview strong { display: block; font-size: 1.65rem; }
.portal-profile main { width: min(100% - 2rem, 66rem); }
.profile-hero {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  margin-top: 1.2rem;
  padding: clamp(1.25rem, 5vw, 3rem);
  min-height: 15rem;
  border-radius: 1.4rem;
  color: #fff;
  background: radial-gradient(ellipse at top right, #9db4d6 0%, transparent 63%), linear-gradient(130deg, #0a1160, #132646);
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 7rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #e9eef3;
  color: #132646;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity { min-width: 0; overflow-wrap: anywhere; }
.profile-identity h1 { margin: .3rem 0; }
.profile-identity p { margin: 0; }
.profile-kicker { font: 600 .75rem var(--titulos); letter-spacing: .1em; text-transform: uppercase; }
.profile-nav { border-bottom: 1px solid #9db4d6; padding: .25rem 0 .8rem; }
.profile-upload { padding: .75rem; border: 1px dashed #9db4d6; border-radius: .65rem; }
.profile-upload small { font-family: var(--lectura); }
.portal .profile-remove { display: flex; align-items: center; }
.portal .profile-remove input { width: auto; }
.profile-registration > p { margin: .5rem 0 1rem; }
#editar-perfil { max-width: 46rem; }
#lecturas > p { margin: .5rem 0; }
.reading-catalog {
  list-style: none; padding: 0; margin: 1.25rem 0 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.reading-card {
  display: grid; grid-template-rows: 1fr auto; min-width: 0;
  border: 1px solid #9db4d6; border-radius: .9rem; overflow: hidden;
  scroll-margin-top: 1rem;
}
.reading-card:target { outline: 2px solid #132646; outline-offset: 2px; }
.reading-card-link { display: flex; flex-direction: column; text-decoration: none; }
.reading-card img, .reading-card-placeholder {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
}
.reading-card-placeholder {
  display: grid; place-items: center; background: #132646; color: #fff;
  font: 600 1rem var(--titulos);
}
.reading-card h3 { padding: .8rem .85rem .5rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.reading-card-cta { padding: 0 .85rem .5rem; font: 600 .8rem var(--titulos); }
.reading-card-heart { border: 0; margin: 0 .65rem .35rem; }
.reading-reaction { margin: 0; padding: 3px; background: transparent; }
.reading-reaction form { margin: 0; }
.reading-reaction :is(button, a) {
  box-sizing: border-box; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 38px; padding: .35rem .7rem; border: 1px solid #9db4d6; border-radius: 999px;
  background: #132646; color: #fff; text-decoration: none;
  font: 600 .78rem Poppins, system-ui, sans-serif; cursor: pointer;
}
.reading-reaction button[aria-pressed="true"] { background: #fff; color: #132646; }
.reading-reaction :is(button, a):focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.profile-nav a[aria-current="page"] { text-decoration-thickness: 2px; }

.reaction-compact button { width: 38px; justify-content: center; padding: 0; font-size: 1.12rem; }

.portal-profile .profile-nav { gap: .45rem; border: 0; padding-bottom: 0; }
.portal-profile .profile-nav a {
  padding: .55rem .8rem; border: 1px solid #9db4d6; border-radius: .55rem;
  font: 600 .8rem var(--titulos); text-decoration: none;
}
.portal-profile .profile-nav a[aria-current="page"] { background: #132646; color: #fff; border-color: #132646; }
.portal-profile .profile-password { margin-top: 1.2rem; border-top: 1px solid #9db4d6; border-bottom: 0; }
.profile-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .6rem; margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid #9db4d6;
  font: 500 .78rem var(--titulos);
}
.portal .profile-footer form { margin: 0; }
.portal .profile-footer button { padding: .35rem .65rem; color: #132646; background: transparent; border: 1px solid #9db4d6; }

.portal .reading-card form { margin: 3px calc(.65rem + 3px) calc(.35rem + 7px); }
.portal .reading-card-remove {
  display: grid; place-items: center; width: 38px; min-height: 38px; padding: 0;
  border: 1px solid #9db4d6; border-radius: 999px; background: #fff; color: #132646;
  font: 600 1.12rem var(--titulos);
}

.forum-section > p { margin: .55rem 0 1rem; }
.forum-thread h3 { margin-top: 1rem; }
.forum-members { border: 1px solid #9db4d6; border-radius: .55rem; padding: .65rem; min-width: 0; }
.portal .forum-members label, .portal .forum-toggle { display: flex; align-items: baseline; gap: .5rem; overflow-wrap: anywhere; }
.portal .forum-members input, .portal .forum-toggle input { width: auto; flex: none; }
.forum-messages { list-style: none; padding: 0; }
.forum-messages li { padding: .65rem; border-bottom: 1px solid #9db4d6; }
.likes-report { list-style: none; padding: 0; }
.likes-report li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; padding: .65rem 0; border-bottom: 1px solid #9db4d6; }
.resource-preview { padding: 1rem; border: 1px solid #9db4d6; border-radius: .75rem; }
.resource-preview :is(h2, p, ul, blockquote) { margin-block: .65rem; }
.resource-preview-cover { display: block; width: 100%; height: auto; border-radius: .65rem; }

[hidden] { display: none !important; }
.editorial-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.editorial-field textarea { line-height: 1.55; }
.editorial-tools { order: -1; display: flex; flex-wrap: wrap; gap: .35rem; }
.portal .editorial-tools button {
  padding: .28rem .55rem; border: 1px solid #9db4d6; background: #fff; color: #132646;
  font: 600 .75rem var(--titulos);
}
.editorial-body { max-width: 68ch; line-height: 1.7; overflow-wrap: anywhere; }
.editorial-body :is(h2, p, ul, blockquote) { margin-block: .75rem; }
.editorial-body h2 { font-size: 1.35rem; }
.editorial-body blockquote { padding-inline-start: .85rem; border-inline-start: 3px solid #9db4d6; }

.portal-admin { font-family: var(--titulos); font-size: .9rem; }
.admin-sidebar { background: #fff; padding: 1rem; }
.admin-brand { display: flex; gap: .7rem; align-items: center; text-decoration: none; margin-bottom: 1.25rem; }
.admin-brand img { border-radius: .6rem; background: #132646; padding: .25rem; }
.admin-brand small, .admin-resource-row small { display: block; color: #4a607c; }
.admin-nav-group { margin: .8rem 0; }
.admin-nav-group p { margin: 0 0 .3rem; font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.admin-nav-group a { display: inline-block; padding: .45rem .65rem; border-radius: .45rem; text-decoration: none; }
.admin-nav-group a[aria-current="page"] { background: #132646; color: #fff; }
.admin-account { padding-top: .75rem; border-top: 1px solid #9db4d6; }
.admin-page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.admin-page-heading p { margin: 0 0 .25rem; font-size: .73rem; text-transform: uppercase; letter-spacing: .12em; }
.admin-page-heading h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.admin-heading-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.admin-action { display: inline-block; background: #fff; border: 1px solid #9db4d6; padding: .5rem .8rem; border-radius: 999px; text-decoration: none; }
.admin-action-primary { background: #132646; color: #fff; }
.portal .admin-resource-list { padding: 0; overflow: hidden; }
.admin-resource-list > p { padding: 1rem; }
.admin-resource-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .65rem; padding: .85rem; text-decoration: none; overflow-wrap: anywhere; }
.admin-resource-row + .admin-resource-row { border-top: 1px solid #e9eef3; }
.admin-resource-row:hover { background: #e9eef3; }
.admin-status { border-radius: 999px; background: #e9eef3; padding: .2rem .5rem; font-size: .67rem; }
.admin-status-published { background: #132646; color: #fff; }
.resource-edit { max-width: 52rem; }
.resource-current-cover { max-width: 26rem; }
@media (min-width: 840px) {
  .portal-admin { display: grid; grid-template-columns: 14rem minmax(0, 1fr); align-items: start; }
  .admin-sidebar { position: sticky; top: 0; min-height: 100vh; max-height: 100vh; overflow: auto; border-right: 1px solid #9db4d6; }
  .admin-nav-group a { display: block; }
  .portal-admin main { width: min(100% - 3rem, 57rem); }
}

.profile-stats {
  display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 0 auto;
  font-family: var(--titulos);
}
.profile-stats div {
  display: flex; flex-direction: column-reverse; gap: .15rem;
  padding: .55rem .8rem; border: 1px solid #9db4d6; border-radius: .65rem;
  background: #132646;
}
.profile-stats dt { font-size: .73rem; }
.profile-stats dd { margin: 0; font-size: 1.45rem; line-height: 1.15; font-weight: 700; }
@media (max-width: 600px) {
  .profile-stats { flex-basis: 100%; margin-left: 0; }
}
